Weblogic Configuration

From Skyway Wiki

Jump to: navigation, search

This page describes any considerations regarding the deployment of a fully or partially generated Spring MVC and Spring Web Flow applications to Weblogic application servers.

This page has been updated to reflect the use of Skyway Builder 6.3.

Contents

Weblogic 10

Here are the steps to deploy to Weblogic 10:

  • From the Enterprise Configuration tab of the Spring DSL, configure the project as follows:
    • Container: WebLogic
      • Transactions: Container
      • Persistence: Container
  • Do a clean build of the project (Project-->Clean...)


Supported Container Deployments

  • WAR - Export the "Web" project as a WAR (Right-click-->Export-->WAR file)
  • EAR - Create an Enterprise Application Project, select the "Web" project as a Java EE Module Dependency, Right-click-->Export-->EAR file

Persistence Notes

  • Container persistence and transactions must be used for all deploys.
  • You must manually create the data store in the WL console for both EAR and WAR deploys. Use the JNDI name found on the Data Source in your {project}-generated-dao-context.xml file. The Data source bean is the one that specifies javax.sql.DataSource as the proxyInterface.
  • When setting up a non-XA data source in the Weblogic 10 console, you must set the data source to use "Emulate Two-Phase Commit" By default, the One-Phase Commit radio button is selected. This setting is found on the second panel of Weblogic's new datasource wizard.
  • By default, Skyway generates a data source file that conflicts with the global data source defined in the WL console. Delete the generated data source file in your web application under WEB-INF/container/datasources. The existence of this file that contains a name that duplicates the JNDI name you've created in the WebLogic Admin console will cause the WebLogic Admin console to go into an infinite loop if you ask it to browse the JNDI tree.
  • Having the persistence engine create tables DOES NOT WORK. This is due to a bug in Open JPA that collides with a forced check in WLS. OpenJPA sets autocommit to true when creating tables. WLS transaction manager throws an exception if any code attempts to set autocommit.
  • WLS hates JPQL queries where the alias is the same as the object. This is the same defect as experienced on WebSphere. You MUST use an alias that is not identical to the object name
  • Add this element to your web.xml replacing "MyDataSource" with the name of your data source.
    <persistence-unit-ref>
         <persistence-unit-ref-name>persistence/MyDataSource</persistence-unit-ref-name>
         <persistence-unit-name>MyDataSource</persistence-unit-name>
    </persistence-unit-ref>

Web Notes

  • When using the <jsp:directive.include> tag on Weblogic, the pageEncoding directive should only be included on the highest level page. The included pages should not specify a pageEncoding directive.
  • Manually remove the version="2.4" attribute from the web-app element in web.xml.

Web Services

Web Service support was not formally tested with 6.3. If you are a Skyway Builder Web Services Edition, Professional Edition or RSA Edition customer, please contact Skyway Support for assistance.

Current Feature Requests

There is an outstanding feature request to improve the code generation to work with WebLogic with fewer manual steps. If you are using WebLogic and would benefit from enhanced code generation geared at smoother interaction with WebLogic, please vote on this request. MOD-3117

Personal tools