The following topics describe the Java EE Service Engine. About the Java EE Service Engine About the Java EE Service EngineThe Java EE Service Engine (SE) is a JSR 208-compliant JBI runtime component that connects Java EE web services and Java EE web service clients with the Normalized Message Router (NMR) in the JBI runtime environment. This connection to the NMR means that Java EE web services can be consumed in a JBI environment, and Java EE web services can consume web services that are available in the JBI environment. The Java EE Service Engine (SE) is automatically installed in the JBI runtime in every Java EE SDK installation that contains JBI. The Java EE SE supports Java EE applications running in the application server and JBI environment. It enables applications that are deployed in the Application Server to use any new protocol plugged into the JBI runtime environment as a Binding Component (BC), and it enables web services deployed on the Application Server to be accessed by these Binding Components. The Java EE Service Engine provides better performance than the default SOAP over HTTP socket connection due to in-process communication between components and additional protocols such as JMS. JBI uses the abstract service model as the main basis of component interactions. Components play one of two roles in such interactions:
Java EE Service Engine As a Service ProviderThe Java EE Service Engine functions as a service provider by enabling an endpoint in NMR. When a Java EE web service is deployed, the deployment runtime of Application Server notifies the Java EE Service Engine so that an endpoint is enabled in the NMR of the JBI runtime. The notification enables any component deployed in NMR to access the Java EE web service. For example, a BPEL application running inside the BPEL service engine can access the Java EE web service by sending a normalized message to the endpoint enabled by the Java EE Service Engine. This way of accessing Java EE web services is an alternative to the normal web service client access defined by JAX-WS. Figure 1: Java EE SE as a Service Provider
Java EE Service Engine As a Service ConsumerWhen a Java EE application needs to access an endpoint of a service provider deployed in the JBI runtime environment, the Java EE Service Engine acts as a bridge between the application server and the NMR in the JBI environment. In this case, the Java EE Service Engine normalizes the SOAP message that otherwise would have been used in the JAX-WS communication and sends it to the NMR. This normalized message is handled by a service that has been enabled by a service provider deployed in the JBI runtime environment.
Figure 2: Java EE SE as a Service Consumer
Java EE Service Engine FeaturesWhen you install Open ESB Starter Kit, the Java EE Service Engine is automatically installed on the Application Server. Open ESB is essentially the JBI Runtime Environment. The Java EE Service Engine acts as a bridge between the Application Server (Glassfish) and the Open ESB environment for web service providers and web service consumers that are deployed in Application Server. It provides numerous benefits including the following:
Runtime Example of the Java EE Service EngineThe minimum user experience in the JBI runtime environment requires a Java EE component, such as a binding component or service engine, and a JBI component. When a JBI component accesses a service within the Java EE, it accesses it through the Java EE SE. In the runtime example, the client application--acting as a web service--sends a message to a message queue, which is picked up by the message driven bean (MDB). Upon receiving that message, and by using the Java EE Service Engine, the MDB contacts the NMR for the service endpoint exposed by the BPEL process. When MDB executes, the BPEL application (hosted by the BPEL Service Engine) contacts the NMR to find its partner services. In our example, there is only one partner service and it is a stateless session bean (JSR 109 webservice) hosted in the same Application Server JVM. The JSR 109 webservice's endpoint is enabled in the NMR by the Java EE Service Engine when the stateless session bean gets deployed. This stateless session bean then uses Java EE persistence APIs to access the database. Figure 3: Java EE SE Use Case Example
Configuring the JEE SEThe Java EE Service Engine is enabled by default. To disable it without
uninstalling it, set the
The JBI framework must also be enabled to deploy a JBI component such as the JEE SE. The following command enables the JBI framework:
JAX-WS Web Services deployed on Glassfish can be packaged as Servlets
or EJBs. The service engine automatically activates web service end
points in ESB at the time of loading of the web service. An endpoint
can be deactivated from ESB by setting
To determine whether requests from a web service consumer are routed
through the Java EE Service Engine, set a stub-property named <sun-web-app> <service-ref> <service-ref-name>sun-web.serviceref/calculator</service-ref-name> <port-info> <wsdl-port> <namespaceURI>http://example.web.service/Calculator</namespaceURI> <localpart>CalculatorPort</localpart> </wsdl-port> <service-endpoint-interface>service.web.example.calculator.Calculator</service-endpoint-interface> <stub-property> <name>jbi-enabled</name> <value>true</value> </stub-property> </port-info> </service-ref> </sun-web-app> For more information about the JEE SE LimitationsThe following is a list of limitations for the JEE SE.
|
|