Jun 30

This Quick Note discusses a simple solution to the use case provided by Leonard Barkley. The question goes like this:

“I dont have any idea how to implement BPEL process but the BPEL deployed as a subscriber of a topic. usually I implement the BPEL process and deployed it as web service.”

We produce a simple GlassFish ESB v2.1-based solution which reads a file, sends its content to a JMS Topic and another simple GlassFish ESB v2.1-based solution which subscribes to the same JMS Topic, receives the message and writes it to a file. Both solutions will use BPEL to implement the simple logic, though it is possible to implement both solutions without BPEL, so we have File BC -> BPEL SE -> JMS BC -> JMS Provider (Topic) -> JMS BC -> BPEL SE -> File BC.

Here is the note: QuickNote003_forLeonardBarkley.pdf

Hire is an archive with the project group containing all the projects developed in the Note: JMSTopicSampleProjGrp.zip

As Leonard Barkley pointed out to me, having implemented the sample, the Note is incorrect on Pages 23 and 24. The JMSSubscriber_JMSIn WSDL should use the Receive type, not Send type as the docuent states. The solution still works, it appears, but the configuration as documented is confusing. Thanks Leonard.

Jun 27

The Portlet developed in the previous blog gives plain facility details. A richer Portlet could use the facility address to show the facility location on a Map.

Here I will walk through development of a Visual Web JSF Mashup Portlet, which will use a Web Service as a data provider to get facility details and a Google Maps REST Service to get the Google map displaying facility location. I use the NetBeans 6.5.1 IDE, part of the GlassFish ESB v2.1 installation, the Portal Pack 3.0.1 NetBeans Plugin and the JSF Portal Bridge provided by the Web Space Server 10. The Portlet will use JSF components provided by Project Woodstock. The Google Map service is integrated into NetBeans IDE. Technologies will be introduced in a practical manner.

It took me some effort to work out how to add a Google Map to a Portlet so I though I will share the experience.

This is not a tutorial on JavaServer Faces, Visual Web JSF, Project Woodstock, Portlet development or Google Maps usage.

Here is the document: 01_FacilityService_WebSpacePortletWithGoogleMap.pdf

Here is an archive containing all the projects developed in this and the last 3 blog entries: 01_FacilityService_all_project.zip

As provided, the ui_facility table has a bunch of addresses which are fairly silly and will never get a proper map. This MySQL script has a bunch of SQL update statements to replace these addresses with real addresses that are mappable.

Jun 24

In some views SOA is represented as a series of 4 layers: Presentation Layer (SOA 1), Business Process Layer (SOA 2), Business Service Layer (SOA 3) and Technical Layer (SOA 4). Typically each layer higher up in the hierarchy consumes services exposed by the layer under it. So the Presentation Layer would consume services provided by the Business Process or Business Service Layers. Service interfaces are described using Web Services Description Language (WSDL), sheltering service consumers from details of service implementation. Web Services are seen as the technical means to implement the decoupled functional layers in a SOA development. Decoupling allows implementations of business functionality at different layers to be swapped in and out without disturbing other layers in the stack. The SOA 1, Presentation Layer, is often implemented as JSR-168-compliant or JSR-286-complaint Portlets, exposed through a standards-based Portal.

The business idea is that patients are looked after in various healthcare facilities. Applications need to allow selection of a facility and to access facility details for display to human operators. A relational holds details of facilities which are a part of the healthcare enterprise. Facility list and details are available through a web service. This web service will be used to construct the JSR-286-comliant Portlet that provides a user view into the facilities and facility details. This Portlet will be deployed to the Sun FOSS Web Space Server 10 Portal.

Previous documents in this series, “GlassFish ESB v 2.1   Creating a Healthcare Facility Web Service Provider” and “NetBeans 6.5.1 and GlassFish v 2.1 – Creating a Healthcare Facility Visual Web Application”, walked the reader through the process of implementing a GlassFish ESB v2.1-based web service which returns facility list and facility details, and a Visual Web JSF Web Application which used that Web Service to display facility list and details.
In this document I will walk through the process of developing a JSR-286-compliant Visual Web JSF Portlet, deployed to the Sun Web Space Server 10 Portal, which will use the Web Service as a data provider. We will use the NetBeans 6.5.1 IDE, which comes as part of the GlassFish ESB v2.1 installation, the Portal Pack 3.0.1 NetBeans Plugin and the JSF Portal Bridge infrastructure provided by the Web Space Server 10. The Portlet will be implemented as a Visual Web JavaServer Faces Portlet using JSF components provided by Project Woodstock. The Portlet will introduce the technology in a practical manner and will show how a web service can be used as a data provider, decoupling the web application from the data stores and specifics of data provision.

Note that this document is not a tutorial on JavaServer Faces, Visual Web JSF, Project Woodstock components or Portlet development. Note also that all the components and technologies used are either distributed as part of the NetBeans 6.5, as part of the GalssFish ESB v2.1, as part of the Web Space Server 10 or are readily pluggable into the NetBeans IDE. All are free and open source.

Here is the document: 01_FacilityService_WebSpacePortlet.pdf

Jun 23

In some views SOA is represented as a series of 4 layers: Presentation Layer (SOA 1), Business Process Layer (SOA 2), Business Service Layer (SOA 3) and Technical Layer (SOA 4). Typically each layer higher up in the hierarchy consumes services exposed by the layer under it. So the Presentation Layer would consume services provided by the Business Process or Business Service Layers. Service interfaces are described using Web Services Description Language (WSDL), sheltering service consumers from details of service implementation. Web Services are seen as the technical means to implement the decoupled functional layers in a SOA development. Decoupling allows implementations of business functionality at different layers to be swapped in and out without disturbing other layers in the stack.

The business idea is that patients are looked after in various healthcare facilities. Frequently applications need to allow selection of a facility and to access facility details for display to human operators. A relational database is used to hold the details of facilities which are a part of the healthcare enterprise. To shelter application developers from the details of the data store facility list and details are made available as a multi-operation web service. This web service will be used to construct the web application that provides a user view into the facilities and facility details.

The previous document in this series, “GlassFish ESB v 2.1   Creating a Healthcare Facility Web Service Provider”, walked the reader through the process of implementing a GlassFish ESB v2.1-based, multi-operation web service which returns facility list and facility details. In this document I will walk through the process of developing a Visual Web Application which will use the Web Service as a data provider. We will use the NetBeans 6.5.1 IDE, which comes as part of the GlassFish ESB v2.1 installation. The application will be implemented as a Visual Web JavaServer Faces Application using JSF component provided by Project Woodstock. This application will introduce the technology in a practical manner and show how a multi-operation web service can be used as a data provider, decoupling the web application from the data stores and specifics of data provision.

Note that this document is not a tutorial on JavaServer Faces, Visual Web JSF, Project Woodstock components or Web Application development. Note also that all the components and technologies used are either distributed as part of the NetBeans 6.5, as part of the GalssFish ESB v2.1 or are readily pluggable into the NetBeans IDE. All are free and open source.

It is assumed that a GlassFish ESB v2.1-based infrastructure, supplemented by the Sun WebSpace Server 10 Portal functionality and a MySQL RDBMS instance, are available for development and deployment of the web application discussed in this paper. It is further assumed that the web service, developed using instructions in “GlassFish ESB v 2.1 – Creating a Healthcare Facility Web Service Provider, is available and deployed to the infrastructure. The instructions necessary to install this infrastructure are discussed in the blog entry “Adding Sun WebSpace Server 10 Portal Server functionality to the GlassFish ESB v2.1 Installation”, supplemented by the material in blog entry “Making Web Space Server And Web Services Play Nicely In A Single Instance Of The Glassfish Application Server”.

Here is the document – 01_FacilityService_WebApplication.pdf

While I am migrating my blog to blogs.czapski.id.au some links in older posys may be broken. For as long as it works, go to the http://blogs.sun.com/javacapsfieldtech/ find the post with the identical title.
Jun 22

In some views SOA is represented as a series of 4 layers: Presentation Layer (SOA 1), Business Process Layer (SOA 2), Business Service Layer (SOA 3) and Technical Layer (SOA 4). Typically each layer higher up in the hierarchy consumes services exposed by the layer under it. So the Presentation Layer would consume services provided by the Business Process or Business Service Layers. Service interfaces are described using Web Services Description Language (WSDL), sheltering service consumers from details of service implementation. Web Services are seen as the technical means to implement the decoupled functional layers in a SOA development. Decoupling allows implementations of business functionality at different layers to be swapped in and out without disturbing other layers in the stack.
In this document I will walk through the process of developing a SOA Composite Application, exposed as a Web Service, which will make available simple business functionality using a multi-operation service. We will use the GalssFish ESB v2.1 infrastructure. The service will use the SOAP/HTTP Binding Component, the Database Binding Component and the BPEL 2.0 Service Engine. This simple service will introduce the components and discuss how a multi-operation web service can be constructed using the GalssFish ESB.
The business idea is that patients are looked after in various healthcare facilities. Frequently applications need to allow selection of a facility and to access facility details for display to human operators. A relational database is used to hold the details of facilities which are a part of the healthcare enterprise. To shelter application developers from the details of the data store facility list and details will be made available as a multi-operation web service. This web service will be used elsewhere to construct a portlet that can be used in an enterprise portal.

The document is available as 01_FacilityService_GFESBv21.pdf

Late breaking news: The MySQL JDBC Driver, which I used in the example, mysql-connector-java-5.1.7-bin.jar, and which is distributed with the GlassFish ESB v2.1, causes connection pool exhaustion and other issues with the example. If you experience these issues pleases download the latest MySQL JDBC Driver, mysql-connector-java-5.1.11-bin.jar as at now, from http://dev.mysql.com/downloads/connector/j/5.1.html and replace the original in domains/domain1/lib/ext.

Jun 20

It is likely that, at some point or another, a SOA-based solution will require a graphical user interface. In a typical 4 layer SOA stack SOA 1, the Presentation Layer, is delivered as a series of Web Applications, by preferences through a Portal-based solution. Sun Web Space Server 10 is a Free and Open Source Portal solution that can be readily integrated into a SOA infrastructure, for example one based on the GlassFish ESB v2.1 – the Free and Open Source ESB. How Web Space Server can be added to the GlassFosh ESB v2.1 infrastructure is discussed in the blog entry “Adding Sun WebSpace Server 10 Portal Server functionality to the GlassFish ESB v2.1 Installation”.
Web Space Server takes over the web container, in a manner of speaking, causing all web references to be redirected through to the portal infrastructure. This makes it impossible to interact with web services deployed to the instance of GlassFish. Web Services and Web Space Server do not play nicely together when installed in the manner discussed in the Blog.

This document provides instructions which will allow Web Services and Web Space Server to play nicely in the same instance of GlassFish by changing the servlet context which the Web Space Server manages from / to a different one. This will allow all other servlet contexts to be treated qas though the Web Space Server was not installed and will allow the two sets of functionality to coexist.

The credit for this solution goes to users@webspace.dev.java.net, in particular Srikanth Konjarla, Deepak Gothe and Allan Foster.

Here is the document, MakingWebSpaceServerAndWebServicesPlayNicely.pdf.

Jun 14

The GlassFish ESB Suite can be used to develop and deploy Composite Applications, a cornerstone of SOA. It has the integration, connectivity and management functionality necessary to develop artifacts in the lower 3 of the 4 SOA Layers. To complete the stack, and provide artifacts in the SOA 1 (Presentation Layer) requires additional technologies. One assumes that a web-based user interface is what one would choose to develop a presentation layer of the composite application. One assumes further that the Composite Applications with the Web-based User Interface will be exposed through a standards-compliant Portal infrastructure as standards-compliant portlets, rather then stand-alone web applications.

This document walks through the process of installing the Sun WebSpace Server 10 Portal to the GlassFish ESB v2.1 installation and addition of Portal Pack tooling to the NetBeans 6.5 tooling packaged with the GalssFish ESB v2.1.

Adding_WebSpaceSewrver10_to_GlassFishESB_v2.1.pdf

Note (April 2010): This also works for Java CAPS 6.2
preload preload preload