Category: Java EE

Oracle SOA Suite 12c has been released

Today, Oracle SOA Suite 12c has been released. It brings important enhancements and improves integration and orchestration of applications and services spanning on-premises, cloud, mobile, and Internet of Things (IoT) devices.
For more information please refer to:
https://blogs.oracle.com/soa/

http://www.oracle.com/technetwork/middleware/soasuite/overview/index.html

No tags Hide

Java EE 7 has been approved

The Java EE 7 Platform has been approved by the Java Community Process. The main objective of Java EE 7 was to enhance productivity and add support for the latest web standards, including HTML5 and Web Sockets. To simplify the development, Java EE 7 has a revised Java Message Service (JSR 343), updated dependency injections (JSR 346) and refined the managed bean model (JSR 349).

Four new specifications have been added:

  • Concurrency Utilities for Java EE 1.0 (JSR 236)
  • Batch Applications for the Java Platform 1.0 (JSR 352)
  • Java API for WebSocket 1.0 (JSR 356)
  • Java API for JSON Processing 1.0 (JSR 353)

The following specifications have been improved:

  • Java Platform, Enterprise Edition 7 (JSR 342)
  • Java Persistence 2.1 (JSR 338)
  • JAX-RS: The Java API for RESTful Web Services 2.0 (JSR 339)
  • Java Servlet 3.1 (JSR 340)
  • Expression Language 3.0 (JSR 341)
  • Java Message Service 2.0 (JSR 343)
  • JavaServer Faces 2.2 (JSR 344)
  • Enterprise JavaBeans 3.2 (JSR 345)
  • Contexts and Dependency Injection for Java EE 1.1 (JSR 346)
  • Bean Validation 1.1 (JSR 349)

Other JSR with maintenance changes include:

  • Web Services for Java EE 1.4 (JSR 109)
  • Java Authorization Service Provider Contract for Containers 1.5 (JACC 1.5) (JSR 115)
  • Java Authentication Service Provider Interface for Containers 1.1 (JASPIC 1.1) (JSR 196)
  • JavaServer Pages 2.3 (JSR 245)
  • Common Annotations for the Java Platform 1.2 (JSR 250)
  • Interceptors 1.2 (JSR 318)
  • Java EE Connector Architecture 1.7 (JSR 322)
  • Java Transaction API 1.2 (JSR 907)
  • JavaMail 1.5 (JSR 919)

 

No tags Hide

Our team has attended the global conference: IBM Impact 2013. There was plenty of great insight and information regarding Cloud Computing technologies during the conference, including PureFlex, PureApplication and PureData.

Here are some interesting session presentations:

•    Future Directions in Cloud Platforms PDF
•    WebSphere Application Infrastructure The Big Picture PDF
•    Continuous Delivery to Your Private PaaS: The Next Era of Private Cloud PDF
•    SOA as the Foundation for Cloud Adoption PDF
•    Next-Gen Productivity Platform for IBM PureSystems, Web and Mobile PDF
•    Exploring IBM PureApplication System Patterns of Expertise PDF
•    Exploring IBM PureApplication System and IBM Workload Deployer Best Practices PDF
•    Introduction to Cast Iron PDF
•    Best Practices for Cast Iron Integration both in the Cloud and On Premise PDF
•    WebSphere in a Virtual Cloudy World PDF
•    Deploying High-Availability Patterns in PureApplication System PDF
•    Why Would I Want to Put My Database in the Cloud? PDF
•    Driving Continuous Delivery with IBM PureApplication Systems PDF

No tags Hide

Web services are technology neutral web based components or applications that use XML-based open standards to enable interoperability in integration. Java introduced Java API for XML Web Services (JAX-WS) for creating web services. JAX-WS API is part of the Java EE platform and supports annotations. It simplifies the development of web service providers and web service clients.

Our goal is to locally design, develop and test a web service and finally deploy it to the AWS Elastic Beanstalk. We will develop a simple web service with top-down approach meaning we will design our web service interface first and then implement it using JAX-WS. To generate Java classes from XML schemas and WSDL, we will use Apache CXF framework. We will also follow best practices while designing and developing our web service.

Let’s design generic XML schemas and a simple, generic, WS-I compliant WSDL. A good practice is to design business objects and messages that envelope business object in web service operations, separately and in different namespaces.
First, we create a library project (general project in Eclipse IDE) and design two business schemas and three messages for our operation:

  • MyBusinesssEntity.xsd
  • MyBusinessFault.xsd
  • DoSomethingRequest.xsd
  • DoSomethingResponse.xsd
  • DoSometingFault.xsd

Sample schema:

xsd_sample2

Now, we can design a web service interface (WSDL) with a single “doSomething” operation with an input, output and business fault. Best practice is to use envelope messages for input, output and fault. In our case we use three messages – request, response and fault message defined above.

To ensure true interoperability and be compliant with WS-I we should follow best practices and use document/literal SOAP binding. You can read about WSDL styles here.

Now we can start with top-down development of our web service. To enable this, we must configure our environment. We use:

In Eclipse we generate a new Dynamic Web Project with configured Apache CXF and Tomcat 7.0 runtime (make sure your web service runtime is also set to Tomcat 7.0 and Apache CXF). Note we use jdk 1.6.

We add a new top-down web service, select our WSDL from the library project and let Apache CXF and wsdl2java to generate JAX-WS stubs and JAXB Java classes we can use in the implementation.

new_ws

classes

If we take a look at the generated classes we can see they are annotated with JAXB and JAX-WS annotations. We can implement our service in the MyServiceImpl.java class. In the interface we can cleary see the JAX-WS annotations.

service

The service endpoint is defined in the copied WSDL in the WebContent/wsdl foler. In our case the service looks like this:

wsdl_endpoint

To test it we deploy it locally on the Tomcat 7.0 server and use SoapUI to test it.

Now we are ready to deploy our web service on the AWS Elastic Beanstalk that automatically handles the deployment, capacity provisioning, load balancing, auto-scaling and application health monitoring. It supports Apache Tomcat 6 and 7, Microsoft IIS 7.5 and 8, PHP 5.3, Phyton, Ruby 1.8.7 and 1.9.3.

To deploy our application on the AWS Elastic Beanstalk from Eclipse we need the AWS Toolkit for Eclipse. When we configure our AWS credentials (access key ID and secret key are accessible in the AWS portal) in the AWS toolkit, we add a new Server > Amazon Web Services > AWS Elastic Beanstalk for Tomcat 7.0. We choose the region (in our case – Ireland) and configure our application and environment.

aws_server

Next, we can deploy the application with specific key pair, enable SSL, assign CNAME to the server, set the application health check URL and assign the email address for notifications. In our case, we will leave all fields empty. Then we add the project on the server, start it and wait (in our case it took about 8 minutes).

aws_upload

aws_server_started

After the deployment we can take a look at our AWS Managemen Conolse > Elastic Beanstalk. Here we can manage our AWS Elastic Beanstalk applications.

aws_console_1

Our application is hosted in the AWS S3 bucket in the same region as the AWS Elastic Beanstalk application.

s3

 

WSDL of our web service is located on:

  • http://mytestenv-s2y4skscv5.elasticbeanstalk.com/services/MyServiceSOAP?wsdl

Finally, we can test the web service, running on AWS Elastic Beanstalk using SoapUI.

soapUI_aws

 

You can download the sample here.

 

, , , , Hide

Oracle OpenWorld 2012 and JavaOne 2012

Oracle OpenWorld 2012 conference is in its full swing in San Francisco. More than 50.000 attendees from over 123 different countries registered for the conference and they have more than 2.500 available sessions to attend. More interesting facts about the conference can be found here: https://blogs.oracle.com/oracleopenworld/entry/oracle_openworld_by_the_numbers

The conference kicked off on Sunday, September 30, when Oracle’s CEO Larry Ellison announced several new services. To existing PaaS and SaaS offering under Oralce Cloud, a new IaaS offering is available. Oracle Cloud also got an extension called Oracle Private Cloud. It provides clients with the same functionality as in the public cloud offering, but the location for hardware is provided by clients. Hardware is owned and managed by Oracle. Following the Private Cloud announcement, Ellison announced Oracle Database 12c, as the first multitenant database. The last major announcement was Exadata X3 Database In-Memory Machine. It uses 26 terabytes of memory and is designed to store entire databases in memory. Larry also gave a talk on Tuesday’s keyword informing the public about the importance of underlying cloud infrastructures on which SaaS applications are running. He pointed out that they are the only cloud provider who is giving their customers the choice of deployment. He predicted that many on-premise customers will move to the Oracle public cloud in the future.

For other information about the Oracle Open World conference visit the conference web site: http://www.oracle.com/openworld/index.html

In parallel to the Oracle OpenWorld 2012, Java One 2012 conference is taking place. Feel free to explore its website: http://www.oracle.com/javaone/index.html

 

 

 

No tags Hide

This post is a follow up on the post where we described how to propagate a transaction from WebLogic 11g (WLS) to WebSphere 8 (WAS). Post is located here: http://www.soa.si/2011/12/20/how-to-propagate-a-global-transaction-between-oracle-weblogic-11g-and-ibm-websphere-8-0-using-ws-at/. It is describing transaction propagation in the opposite direction from WLS to WAS using WS-Atomic Transactions.

In this follow up I will describe transaction propagation from WAS to WLS using WS-AT.  I am using the same two JAX-WS Web Services as are used in the previous post. One is deployed on WAS and one on WLS. They both contain operation insert() which we use for inserting a record in a database table. For this each environment uses a separate database and has configured a corresponding XA Data Source. We implemented additional JAX-WS Web Service facade. Its penis enlargement extender role is to start a global transaction and invoke other two services inside this transaction.

 

 


Main steps:

  • From the previous post we use XA-enabled data source and both web services that participate in a global transaction.
  • Next step is to configure WAS transaction service for interoperability and proper WS-AT version (we used WS-AT version 1.2) using WAS administrative console.
  • We can also configure WAS to use Secure Socked Layer connection for WS-AT coordination or disabling it in case we do not want to use it.
  • Implement the facade Web Service. There we are calling both web services in one global transaction which is controlled using Java Transaction API (JTA). Both service clients must have attached proper WS-AT policy. We also recommended using WS-Addressing.

No tags Hide

A few weeks ago we faced an interesting challenge: how to propagate a transaction context between Oracle WebLogic 11g and IBM WebSphere 8. Propagating a transaction context between different Java EE servers can sometimes present a problem, especially if those servers support different Java EE versions. WebLogic 11g (10.3.5.0) supports Java EE 5 while WebSphere 8 supports Java EE 6. We successfully solved the problem using WS-Atomic Transaction (WS-AT).

In this post, I will present the main steps how we propagated a transaction from WebLogic (WLS) to WebSphere (WAS). The solution for the opposite direction will follow in a separate post.

(more…)

No tags Hide