![]() |
![]() |
![]() |
![]() |
![]() |
Hereafter, Oracle Tuxedo is referred to as Tuxedo, Oracle Jolt is referred to as Jolt, and Oracle WebLogic is referred to as WebLogic for readability.
•
•
Note: For Oracle WebLogic Server 6.0 or later, the xml-based config.xml configuration file has replaced the weblogic.properties file. For more information about the config.xml file, refer to the Oracle WebLogic Server Administration Guide.Figure 1‑1 shows the architecture for Oracle Jolt for Oracle WebLogic Server.
Note: For more information about configuration and run-time MBeans, refer to the Oracle WebLogic Server Administration Guide.The WebLogic Server is configured to initialize the session pools at startup through the config.xml file. A special startup class, PoolManagerStartUp, is invoked by the WebLogic Server with a number of parameters. This class functions as follows:The number of session pools created depends on the number of JoltConnectionPools that are configured in the config.xml file.A servlet may be invoked directly, that is, may actually present HTML to the browser, or may be invoked indirectly from an HTML form when the user submits the form. When the WebLogic Server receives a request containing the registered virtual name of a servlet, it invokes the appropriate servlet's service() method. For more information on HTTP servlets, refer to the Programming WebLogic HTTP Servlets guide.The HTTP servlet's service() method (which invokes either the servlet's doPost() or doGet() method, depending on the context) is invoked and passes an HttpServletRequest object containing the HTTP data sent from the browser. In the example packages described in “Using the Example Packages” on page 1‑7, the client's query data is used in a transaction call to Tuxedo, and the response is built into the new HTML page.A servlet obtains a reference to the session pool manager that was created and initialized by the WebLogic Server when it started. The pool manager is used to retrieve the session pool that was configured in the config.xml file. This session pool references the appropriate Jolt Server in a Tuxedo domain. A servlet uses the session pool to invoke a specific Tuxedo service.Tuxedo services are described and exported (declared accessible) in the Oracle Tuxedo Service Metadata Repository. In the Metadata Repository, the service’s expected input and output parameter types are declared. A servlet must supply the expected input parameters; Oracle Jolt for Oracle WebLogic Server uses specialized ServletSessionPool objects that can accept their input directly from an HttpServletRequest object. The output is returned in a ServletResult object.If no sessions are available from a session pool, or the session pool is suspended, then a SessionPoolException is thrown.Multiple requests can be grouped into a single transaction. When a transaction fails, a TransactionException is thrown. This exception should be caught by the servlet and handled appropriately. (Usually, the servlet performs a rollback.)
• The desired results are extracted from the ServletResult object.
• The WebLogic Server returns the HTML page to the client via the HttpServletResponse object.The WebLogic Server is also configured to shut down the existing session pool connections to Tuxedo through the config.xml file.Register the class PoolManagerShutDown so that the Jolt session pool is cleaned up properly when the WebLogic Server shuts down. PoolManagerShutDown does not require an attribute in the config.xml file.Two example packages are included with Oracle Jolt for Oracle WebLogic Server. These packages are described in Appendix B, “Simple Servlet Example,” and Appendix C, “Servlet with Enterprise JavaBean Example.” They demonstrate how Jolt is used in WebLogic servlets to access Tuxedo services. You can build, run, and inspect these examples to help you decide how to use WebLogic to extend Tuxedo services to the Internet.