Migrate the Oracle WebLogic Server weblogic-ejb-jar.xml Deployment Descriptor to Red Hat JBoss Enterprise Application Platform 6 or 7
Summary
The weblogic-ejb-jar.xml
deployment descriptor file describes elements that are specific to the Oracle WebLogic Server. Many of these elements map to the jboss-ejb3.xml
file in the equivalent file in Red Hat JBoss Enterprise Application Platform 6 or 7. Some elements, however, map to other descriptor files.
Map weblogic-ejb-jar.xml Elements to the jboss-ejb3.xml Descriptor
The following table maps the WebLogic XPathweblogic-ejb-jar.xml
elements to the corresponding JBoss XPath jboss-ejb3.xml
elements. Notice the JBoss element descriptors include the type of the bean in the XPath: entity
, session
, or message-driven
EJB Deployment Descriptor Element Mapping Table
WebLogic weblogic-ejb-jar.xml XPath Element | JBoss jboss-ejb3.xml XPath Element |
---|---|
/weblogic-ejb-jar/weblogic-enterprise-bean/ejb-name |
Entity Bean: /ejb-jar/enterprise-beans/entity/ejb-name Session Bean: /ejb-jar/enterprise-beans/session/ejb-name Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/ejb-name |
/weblogic-ejb-jar/weblogic-enterprise-bean/resource-description/res-ref-name |
Entity Bean: /ejb-jar/enterprise-beans/entity/resource-ref/res-ref Session Bean: /ejb-jar/enterprise-beans/session/resource-ref/res-ref Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/resource-ref/res-ref |
/weblogic-ejb-jar/weblogic-enterprise-bean/resource-env-description/res-env-ref-name |
Entity Bean: /ejb-jar/enterprise-beans/entity/resource-env-ref/resource-env-ref-name Session Bean: /ejb-jar/enterprise-beans/session/resource-env-ref/resource-env-ref-name Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/resource-env-ref/resource-env-ref-name |
/weblogic-ejb-jar/weblogic-enterprise-bean/ejb-reference-description/ejb-ref-name |
Entity Bean: /ejb-jar/enterprise-beans/entity/ejb-ref/ejb-ref-name Session Bean: /ejb-jar/enterprise-beans/session/ejb-ref/ejb-ref-name Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/ejb-ref/ejb-ref-name |
/weblogic-ejb-jar/weblogic-enterprise-bean/service-reference-description/service-ref-name |
Entity Bean: /ejb-jar/enterprise-beans/entity/service-ref/service-ref-name Session Bean: /ejb-jar/enterprise-beans/session/service-ref/service-ref-name Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/service-ref/service-ref-name |
/weblogic-ejb-jar/weblogic-enterprise-bean/service-reference-description/wsdl-file |
Entity Bean: /ejb-jar/enterprise-beans/entity/service-ref/wsdl-file Session Bean: /ejb-jar/enterprise-beans/session/service-ref/wsdl-file Message-Driven Bean: /ejb-jar/enterprise-beans/message-driven/service-ref/wsdl-file |
Map Additional weblogic-ejb-jar.xml Elements to the JBoss Enterprise Application Platform Equivalent
The following section describes how to map addtional elements to the JBoss Enterprise Application Platform equivalent.
-
delay-updates-until-end-of-tx:
This element in the
webLogic-ejb-jar.xml
file, which defaults to True, is used for performance reasons to delay updates to the persistent store of all beans until the end of the transaction. When set to False, updates are sent to the database after each method invocation, but are not committed until the end of the transaction. This allows other processes to access the persisted data while the transaction is waiting to be completed. In JBoss EAP, you can achieve the same behavior by specifying the<sync-on-commit-only>
in thejbosscmp-jdbc.xml
file. For example:<jbosscmp-jdbc> <!-- elements removed for readability --> <entity> <ejb-name>Student</ejb-name> <create-table>true</create-table> <remove-table>true</remove-table> <table-name>STUDENT</table-name> <!-- elements removed for readability --> <sync-on-commit-only>true</sync-on-commit-only> <insert-after-ejb-post-create>true</insert-after-ejb-post-create> <call-ejb-store-on-clean>true</call-ejb-store-on-clean> </entity> </jbosscmp-jdbc>]]>
This feature is available in JBoss EAP 6.1 or later. For JBoss EAP 6.0.x, it is available as a patch.
-
allow-concurrent-calls:
The
<allow-concurrent-calls>
element was specified in thewebLogic-ejb-jar.xml
file to allow concurrent access to a Stateful Session Bean. For example:<allow-concurrent-calls>true</allow-concurrent-calls>
The @AccessTimeout annotation interface, which was introduced in the Java 6 specification, is the standard way to specify container managed concurrency for stateful session beans.
To prohibit concurrent access, set the @AccessTimeout value to zero.
@AccessTimeout(value = 0)
The following example shows how to specify that the container should block a new request for 2 seconds before timing out when a bean is currently processing a request.
@AccessTimeout(value = 2, unit = TimeUnit.SECONDS)
The following example shows how to tell the container to block a request to a bean indefinitely until the current request completes.
@AccessTimeout(value =-1 )
For more information, see the Annotation Type AccessTimeout Javadoc.
Comments