Oracle® Fusion Middleware Upgrade Guide for Java EE 11g Release 1 (11.1.1) Part Number E10126-02 |
|
|
View PDF |
This appendix contains reference information you can use when preparing your Oracle Application Server 10g applications for redeployment on Oracle WebLogic Server.
Refer to the following sections for more information about upgrading elements of the following OC4J deployment descriptors:
The OC4J-specific application-level Web descriptor, orion-web.xml
, is distributed in the /WEB-INF
directory of your WAR files. It is used to add OC4J-specific settings, or override any settings in web.xml
.
In Oracle WebLogic Server, the equivalent vendor specific deployment descriptor is called weblogic.xml
, and it resides within the /WEB-INF
directory of the web module.
When redeploying your 10g applications on Oracle WebLogic Server, you must convert any specific OC4J settings you have set in your Web module to the WebLogic Server equivalents in the weblogic.xml
file. For more information, refer to the information provided for each element in the orion-web.xml
file in this appendix.
Allows OC4J web applications to refer to code sources (for example, JAR or ZIP files), which are located inside and outside the Web application scope. Any valid code sources contained in these locations are added to the Web application's class-loader at runtime.
None.
Two options:
Copy the referenced JAR files to the Web application's WEB-INF/lib
directory.
OR
Package the classes in a JAR file and deploy the JAR file as an Oracle WebLogic Server shared library, which is referenced by the application through a <library-ref>
element in the application's weblogic-application.xml
deployment descriptor.
"Creating Shared Java EE Libraries and Optional Packages" in the Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server
Overrides the value specified through a corresponding <context-param>
element in web.xml
for a servlet context parameter.
None.
There is no direct equivalent in Oracle WebLogic Server. However, It is possible to override context parameters via the following from any servlet or filter:
getServletContext().getInitParameter("ContextParam")
"ServletConfig" Java servlet interface in the Java 2 Platform, Enterprise Edition, v 1.3 API Specification on the java.sun.com Web site
Defines the path to a file containing MIME mappings.
None.
There is no direct equivalent in Oracle WebLogic Server. However, it is possible to override the value specified in the <mimeMappings>
element through a corresponding <mime-mapping>
element in web.xml
.
"web.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Adds a virtual directory mapping for static content, working in a way that is conceptually similar to symbolic links on a UNIX system, for example.
The virtual directory enables you to make the contents of the real document root directory available to the application without physically residing in the Web application WAR file. This is useful, for example, when linking to an enterprise-wide error page from multiple WAR files.
<virtual-directory-mapping>
Create an equivalent <virtual-directory-mapping>
entry in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Specifies optional access masks for the application. You can use host names or host domains to filter clients, use IP addresses and subnets to filter clients, or you can use both.
None.
Create the same filter at either your network firewall or application load-balancer, if available. Alternatively, consider using an Oracle WebLogic Server network connection filter to provide a filter for the Oracle WebLogic Server domain.
However, it is important to note that Oracle WebLogic Server network connection filters can act only on an entire domain and cannot be set on a per application basis.
"Using Network Connection Filters" in the Oracle Fusion Middleware Programming Security for Oracle WebLogic Server
Specifies a servlet to call when the response of the current servlet is set to a specified MIME type.
The specified servlet is called after the current servlet. Use this for filtering or transforming certain kinds of output.
None.
Create a standard filter to achieve the same functionality. OC4J servlet chaining is an older and proprietary mechanism with functionality similar to that of standard servlet filtering, which was introduced in version 2.3 of the Servlet specification.
"The Essentials of Filters" on the java.sun.com
Web site.
Specifies a servlet to use as a request tracker, which is invoked for each separate request sent from a browser to the server, at the same time as the corresponding response is committed (immediately before the response is actually sent).
Request trackers are useful for logging information.
None.
Create a standard Servlet Request Listener that contains the functionality of the request tracker servlet.
OC4J servlet request tracker is an older and proprietary mechanism with functionality similar to that of a standard request listener, which was introduced in version 2.4 of the Servlet specification.
"Servlet Life Cycle" in the J2EE 1.4 Tutorial on the java.sun.com
Web site.
Specifies the session-tracking settings for this application.
Session tracking is accomplished through cookies, assuming a cookie-enabled browser.
<session-descriptor>
Use the <session-descriptor>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This subelement of <session-tracking>
specifies a servlet to use as a session tracker.
A session tracker is invoked as soon as a session is created; specifically, at the same time as the invocation of the sessionCreated()
method of the HTTP session listener (an instance of a class implementing the javax.servlet.http.HttpSessionListener
interface).
Session trackers are useful for logging information, for example.
None.
Create a standard HttpSessionListener that contains the functionality of the session tracker servlet.
"Servlet Life Cycle" in the J2EE 1.4 Tutorial on the java.sun.com
Web site.
Declares a JNDI location for an external resource, such as a data source, JMS queue, or mail session. This is in conjunction with a corresponding <resource-ref>
element in the web.xml
file, which declares the resource.
<resource-description>
Use the <resource-description>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This element, through its location attribute, specifies an optional JNDI context that will be used instead of the default context in looking up the resource mapped in the parent <resource-ref-mapping>
element.
This is useful when you are connecting to third-party modules, such as a third-party JMS server, for example.
None.
In Oracle WebLogic Server, the default module context is used to look up the JNDI name. However, if the third-party JNDI module is a JMS server and the intent is to use the associated connection factories and destinations, WebLogic JMS enables you to reference third-party JMS providers within a local WebLogic Server JNDI tree.
"Configuring Foreign Server Resources to Access Third-Party JMS Providers" in Oracle Fusion Middleware Configuring and Managing JMS for Oracle WebLogic Server
Declares a JNDI location for an environment resource. This is in conjunction with a corresponding <resource-env-ref>
element in the web.xml
file, which declares the resource.
<resource-env-description>
Use the <resource-env-description>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Overrides the value specified through a corresponding <env-entry>
element in web.xml, for an environment entry.
None.
There is no direct equivalent in Oracle WebLogic Server. However, it is possible to override the value specified in a corresponding <env-entry>
element in web.xml
.
"web.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Declares a JNDI location for an EJB. This is in conjunction with a corresponding <ejb-ref>
or <ejb-local-ref>
element to declare the EJB in the web.xml
file.
<ejb-reference-description>
Use the <ejb-reference-description>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Use this element in conjunction with a <service-ref>
element that appears in the web.xml
file to declare a Web service.
<service-ref-description>
Use the <service-ref-description>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Sets the expiration for a given set of resources; that is, how long before the resources will expire in the browser. (The browser reloads an expired resource upon the next request for it.)
This is useful for caching policies, such as not reloading images as frequently as documents.
None.
This is performance feature OC4J Servlet container in that this can reduce the requests to the server by asking the browser to cache certain requests.
There is no equivalent feature in Oracle WebLogic Server.
None.
Configures the OracleAS JAAS Provider and Single Sign-On (SSO) properties for servlet execution. You must set these features appropriately to invoke a servlet under the privileges of a particular security subject.
None.
In Oracle WebLogic Server, security subject propagation is automatically supported within the same domain.
However, if the identity is propagated between multiple domains, cross-domain security or global trust must be enabled.
Oracle Fusion Middleware Understanding Security for Oracle WebLogic Server
"Enable Cross Domain Security between domains" in the Oracle WebLogic Server Administration Console online help
This element maps a security role to specified users and groups, or to all users. It maps to a security role of the same name specified through a <security-role>
element in the web.xml
file. Use either the implies All attribute or an appropriate combination of subelements—<group>
, <user>
, or both.
<security-role-assignment>
Use the <security-role-assignment>
element in weblogic.xml
. The security role name should be created in the destination Oracle WebLogic Server domain.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This section describes the attributes supported by the OC4J <web-app-class-loader>
element in the orion-web.xml deployment descriptor.
Set this to "true" to search and load WAR file classes before system classes. By default, system classes are searched and loaded first.
None.
Configure a filtering classloader by adding a <prefer-application-package>
element in the application's weblogic-application.xml
, which lists the packages be loaded explicitly from the application and ensure that the "required" version of the JAR file is available to the application, either as a application shared library or by bundling the JAR file in the APP-INF/lib
or WEB-INF/lib
directories of the application.
Unlike OC4J, if a WebLogic Server filtered class cannot be resolved through the application class-loader, Oracle WebLogic Server will not attempt to load it from parent class-loaders. It is therefore important to ensure that the package names listed within the <prefer-application-packages>
element of weblogic-application.xml
are correct.
"Using a Filtering Classloader" in Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server
"Creating Shared Java EE Libraries and Optional Packages" in Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server
Set this attribute to "false" to not ignore the classpath specified in the WAR file manifest Class-Path
attribute when searching and loading classes from the WAR file (regardless of the search-local-classes-first
setting). Otherwise, the classpath from the WAR file manifest is included.
None.
WebLogic Server does not read the classpath specified in the WAR file manifest. However, it is possible to bundle the classes as part of application WEB-INF/lib
directory.
"Creating Shared Java EE Libraries and Optional Packages" in Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server
Specifies whether users should be assigned a session as soon as they log in to the application.
None.
In WebLogic Server, users are automatically assigned a session as soon as they log in to the application. Unlike OC4J, this behavior cannot be disabled with a deployment descriptor element.
None.
Specifies the default size of the output buffer for servlet responses, in bytes.
None.
There is no direct equivalent of this configuration element in Oracle WebLogic Server. However, it is possible to call setBufferSize()
using the response object from any servlet. A JSP page can also include a buffer size directive, <%@ page buffer%>
.
None.
In OC4J 10g Release 3 (10.1.3.1.0), for JSP pages and for the servlet container, this attribute specifies the ISO character set to use by default.
In general, for JSP 2.0 users, Oracle instead recommends standard <page-encoding>
functionality (under the web.xml
<jsp-config>
element, according to the JSP 2.0 specification), to specify character sets according to URL patterns.
However, default-charset
may be useful if you have large numbers of JSP pages, particularly across multiple applications, to avoid the necessity of making numerous changes in your EAR files.
Also, you can use default-charset
to set a base default, then use <page-encoding>
functionality to override the default for particular URL patterns.
jsp-descriptor/encoding
Use the jsp-descriptor/encoding
configuration in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Specifies a default content type for servlet responses, for situations where the setContentType()
method is not called from the servlet implementation.
If default-mime-type
is not specified, then there is no default content type.
container-descriptor/default-mime-type
Use the container-descriptor/default-mime-type
configuration in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Use this OC4J-specific flag during development; it prompts the OC4J server to check a particular directory for updates to servlet source files.
None.
Oracle WebLogic Server does not auto-compile java sources. However:
To enable dynamic class loading for JSP files, configure jsp-descriptor/page-check-seconds
in weblogic.xml
.
To enable dynamic class loading for servlets, configure container-descriptor/servlet-reload-check-secs
in weblogic.xml
.
In development mode, both these flags are set with the default value of one (1) second. In a production environment, these flags are disabled and need to be set explicitly.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This attribute specifies whether to allow directory browsing for a URL that ends in "/".
container-descriptor/index-directory-enabled
Use the container-descriptor/index-directory-enabled
configuration in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This OC4J-specific flag for performance tuning in conjunction with a "true" setting for the simple-jsp-mappingattribute
.
None.
No equivalent in Oracle WebLogic Server.
None.
Determines when to check a static file, such as an HTML file, to see whether its timestamp has changed and it should therefore be reloaded from the file system.
container-descriptor/index-directory-enabled
Use the container-descriptor/resource-reload-check-sec
element in weblogic.xml
.
Also consider these related weblogic.xml
settings:
To use similar setting for JSP, use the jsp-descriptor/page-check-seconds
.
To use similar setting for servlets, use container-descriptor/servlet-reload-check-secs
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Specifies the JSP cache directory, which is used as a base directory for output files from the JSP translator.
jsp-descriptor/workingDir
Use the workingDir
attribute of the <jsp-descriptor>
element in weblogic.xml
.
However, note that unlike the jsp-cache-directory
configuration in OC4J, this directory is not relevant for TLDs.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Indicates whether persistent TLD caching is enabled for JSP pages.
None.
There is no need to upgrade this configuration, because Oracle WebLogic Server supports TLD caching, and TLD caching is ON by default.
Unlike OC4J, TLD caching cannot be disabled with a deployment descriptor element.
None.
Set this flag to "false" to print an empty string instead of the default "null" string for null output from a JSP page.
jsp-descriptor/print-nulls
Use the print-nulls
attribute of the <jsp-descriptor>
element in weblogic.xml
.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
Use this attribute to provide a semicolon-delimited list of one or more directories to use as "well-known" locations if persistent TLD caching is enabled for JSP pages (through the jsp-cache-tlds
attribute).
None.
There is no need to upgrade this configuration, because Oracle WebLogic Server supports TLD caching, and TLD caching is ON by default.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server
Specifies a period of time after which any JSP page will be removed from memory if it has not been requested.
None.
This feature affects applications in which efficient memory utilization is a key factor. It frees up resources in situations where some JSP pages are called infrequently.
There is no need to upgrade this feature.
None.
Indicates where to store servletHttpSessionobjects
for persistence across server restarts or application redeployments.
Session objects must be serializable (directly or indirectly implementing the java.io.Serializable
interface) or remoteable (directly or indirectly implementing the java.rmi.Remote
interface) for this feature to work.
persistent-store-type
attribute of the session-descriptor
element
save-sesssions-enables
attribute of the container-descriptor
element
Set the persistent-store-type
attribute of the session-descriptor
element to "memory," and set the save-sessions-enabled
attribute of the container-descriptor
element to "true" in weblogic.xml
.
This will ensure that sessions are serialized to disk across application redeployments or server restarts.
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server
The major version number of the orion-web.xml
XSD.
None.
Not required in Oracle WebLogic Server.
None.
The minor version number of the orion-web.xml
XSD.
None.
None.
None.
Use this attribute, in conjunction with a "true" setting for the OC4J system property http.webdir.enable
, to enable servlet invocation by class name in standalone OC4J.
After the system property is set, any servlet-webdir
setting that starts with a slash ("/") enables this feature and specifies a special URL portion to insert after the context path to instruct OC4J to invoke a servlet by class name. Anything appearing after this path in a URL is assumed to be a class name, including the package.
This feature is typically used in an OC4J standalone environment during development and testing; it presents a significant security risk and should not be used in a production environment.
None.
Configure standard servlet and servlet-mapping declarations from the servlet specification to configure weblogic.servlet.ServletServlet
.
"Creating and Configuring Servlets" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server
Set this to "true" if "*.jsp" is mapped to only the oracle.jsp.runtimev2.JspServlet
front-end JSP servlet.
This would be specified in the <servlet>
elements of any Web descriptors affecting your application (global-web-application.xml
, web.xml
, and orion-web.xml
).
Enabling this attribute improves performance for JSP pages.
None.
This is performance tuning flag for OC4J JSP container and is not required in WebLogic Server.
None.
For situations in which the development attribute is set to "true", the source-directory
setting specifies where to look for servlet source files to auto-compile.
If you use the default location, OC4J keeps track of the location of the /WEB-INF
directory of your application after deployment. Note that modified source files will be found anywhere under the source-directory
directory, according to package name.
page-check-seconds
attribute of the jsp-descriptor
element
servlet-reload-check-secs
attribute of the container-descriptor
element
WebLogic Server does not auto-compile java sources.
To enable dynamic class loading for JSP files, configure page-check-seconds
attribute of the jsp-descriptor
element.
To enable dynamic class loading for servlets, configure the servlet-reload-check-secs
attribute of the container-descriptor
element.
In development mode, both these flags are set with the default value 1 second. In Production environment, these flags are disabled and need to be set explicitly."
"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.
This is the path to a temporary directory that can be used by servlets and JSP pages for scratch files. The path can be either absolute, or relative to the deployment directory.
None.
Configure the javax.servlet.context.tempdir
attribute from Servlet Specification.
Note that applications may not work properly, if at all, when using a temporary work directory that Servlets and other classes can use to store information.
"ServletContext" Java servlet interface in the Java 2 Platform, Enterprise Edition, v 1.3 API Specification on the java.sun.com Web site
The OC4J-specific application-level EJB descriptor, orion-ejb.xml
, is distributed in the /WEB-INF
directory of your WAR files. It is used to add OC4J-specific settings, or override any settings in ejb-jar.xml
.
In Oracle WebLogic Server, the equivalent vendor specific deployment descriptor is called weblogic-ejb-jar.xml
, and it resides in the /WEB-INF
directory of the web module.
When redeploying your 10g applications on Oracle WebLogic Server, you must convert any specific OC4J settings you have set in your EJB module to the WebLogic Server equivalents in the weblogic-ejb-jar.xml
file. For more information, refer to the information provided for the key elements and element attributes and in the orion-ejb.xml
file in this appendix.
Provides additional, customized deployment information for a session bean deployed within this JAR file. The existence of this element indicates that the application contains customized deployment settings for a session bean.
Session bean customization in Oracle WebLogic Server is accomplished via the stateless-session-descriptor
and stateful-session-descriptor
elements.
"stateless-session-descriptor" and "stateful-session-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element indicates whether or not to copy (clone) all the incoming and outgoing parameters in EJB calls. Set to false
if you are certain that your application does not assume copy-by-value
semantics for a speed-up. The default value is true.
enable-call-by-reference
Specify the copy by value semantics in weblogic-ejb-jar.xml
using the enable-call-by-reference
element.
"enable-call-by-reference" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <session-deployment>
element to set an idle timeout for each bean. When this timeout expires, passivation occurs. Set this attribute to the appropriate number of seconds. Default: 300 seconds. (5 minutes). To disable, specify any negative number.
stateful-session-cache/idle-timeout-seconds
Use the stateful-session-cache/idle-timeout-seconds
element of stateful-session-descriptor
to set the idle timeout in weblogic-ejb-jar.xml
.
"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element is the number of minimum bean implementation instances to be kept instantiated or pooled. The default is zero. This setting is valid for stateless session beans only.
The presence of this attribute indicates that the application contains customized bean pooling settings.
initial-beans-in-free-pool
Set the minimum size of a bean pool in weblogic-ejb-jar.xml
using the initial-beans-in-free-pool
element.
"Pooling for Stateless Session EJBs" Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element is the presence of this attribute indicates that the application contains customized bean pooling settings
max-beans-in-free-pool
Set the maximum size of a bean pool in weblogic-ejb-jar.xml
using the max-beans-in-free-pool
element
"Pooling for Stateless Session EJBs" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <session-deployment>
element to set the percentage of max-instances
number of beans that can be in memory before passivation occurs.
max-beans-in-cache
Use the stateful-session-cache/max-beans-in-cache
element of stateful-session-descriptor
to set the idle timeout in weblogic-ejb-jar.xml
.
"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element specifies the number of times to retry a transaction that was rolled back due to system-level failures. The default is 0.
For a stateful session bean, if a RuntimeException, Error, or RemoteException is thrown, the OC4J does not do a retry.
retry-methods-on-a-rollback/retry-count
To enable retries for all beans in an EJB module in weblogic-ejb-jar.xml
, use the retry-methods-on-rollback/retry-count
element.
Note, however, that the behavior differs between OC4J and Oracle WebLogic Server. OC4J specifies retries on a per-EJB basis while WebLogic Server configures retries on a per-EJB module basis.
"retry-methods-on-rollback" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <session-deployment>
element to check all resources at this time interval. At this time, if any of the thresholds have been reached, passivation occurs. Default: 180 sec. (3 min.).
To disable, specify any negative number.
None.
Not supported by Oracle WebLogic Server.
N/A
Use this attribute of the <session-deployment>
element to define the number of beans to be passivated if any of the resource thresholds have been reached.
Passivation of beans is performed using the least recently used algorithm. Default: one-third of the max-instances attribute. You can disable this attribute by setting the count to zero or a negative number.
None.
Not supported in Oracle WebLogic Server.
N/A
Use this attribute of the <session-deployment>
element to define the path to the file where sessions are stored across restarts.
None.
This is not supported by Oracle WebLogic Server; however, you might be able to use an Oracle WebLogic Server custom persistent store.
"Specifying the Persistent Store Directory for Passivated Beans" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element specifies how long to keep stateless sessions cached in the pool.
For stateless session beans, if you specify a pool-cache-timeout
, then at every pool-cache-timeout
interval all beans of the corresponding bean type in the pool are removed. If the value specified is zero or negative, then the pool-cache-timeout
is disabled and beans are not removed from the pool.
idle-timeout-seconds
Set the timeout value of a bean pool in weblogic-ejb-jar.xml
using the idle-timeout-seconds
element.
"Pooling for Stateless Session EJBs" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <session-deployment>
element to set the maximum number of seconds that a stateful session bean may be inactive before being subject to pool clean-up. If the value is zero or negative, then all timeouts are disabled.
Every 30 seconds the pool clean up logic is invoked. Within the pool clean up logic, only the sessions that timed out, by passing the timeout value, are deleted.
stateful-session-cache
Use the stateful-session-cache/session-timeout-seconds
element of stateful-session-descriptor
to set the session timeout in weblogic-ejb-jar.xml
.
"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This attribute of the <session-deployment>
element indicates the maximum number of seconds that OC4J will wait for a transaction started by this stateless or stateful session bean to commit or rollback. If the value is zero or negative, the timeout is disabled.
transaction-descriptor
element and its trans-timeout-seconds
child element
Set the transaction timeout for an EJB in weblogic-ejb-jar.xml
using the transaction-descriptor
/trans-timeout-seconds
element and child element.
"transaction-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This element maps any EJB references to JNDI names.
Before one enterprise bean, acting in the role of a client (call it the source enterprise bean), can access another enterprise bean (call it the target enterprise bean), you must define an EJB reference to the target enterprise bean in the deployment descriptor of the source enterprise bean.
ejb-reference-description
Set the JNDI location mapping for an EJB reference using the ejb-reference-description
element in weblogic-ejb-jar.xml
.
"ejb-reference-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This element maps any EJB references to JNDI names.
You can define an environment reference to resource manager connection factories that provide connections to such services as a JDBC data source, JMS topic or queue, Java mail, or an HTTP URL. These references are logical names that OC4J binds at deployment time to the actual resource manager connection factories that it provides.
resource-description
Set the JNDI location mapping for a resource reference using the resource-description
element in weblogic-ejb-jar.xml
.
"resource-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
The <resource-env-ref-mapping>
element is used to map an administered object for a resource.
For example, to use JMS, the bean must obtain both a JMS factory object and a destination object. These objects are retrieved at the same time from JNDI. The <resource-ref>
element declares the JMS factory and the <resource-env-ref>
element is used to declare the destination. Thus, the <resource-env-ref-mapping>
element maps the destination object.
resource-env-description
Set the JNDI location mapping for a resource environment reference using the resource-env-description
element in weblogic-ejb-jar.xml
.
"resource-env-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
The <message-destination-ref-mapping>
element is only used if you are using JMS 1.1.
Use this element to map the message-destination-ref-name
in the client deployment descriptor to another location that is available in the OC4J environment. It provides means of linking message consumers and producers to one or more common logical destinations.
message-destination-descriptor
Set the JNDI location mapping for a message destination mapping using the message-destination-descriptor
element in weblogic-ejb-jar.xml
.
"message-destination-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This value for the session-type
element indicates that the application contains a stateful session bean.
stateful-session-cache/cache-type
The default passivation strategy for stateful session beans differs between OC4J and WebLogic Server.
By default, WebLogic Server uses a "Not Recently Used" passivation model, where passivation only occurs when resource limits have been reached. OC4J follows a strict "Least Recently Used" model where passivation occurs as soon as the idle timeout for a bean is reached.
If eager passivation semantics are required, then set the stateful-session-cache/cache-type
element to LRU in the weblogic-ejb-jar.xml
stateful-session-descriptor to preserve OC4J semantics.
"Stateful Session EJB Passivation" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
This section of the orion-ejb-jar.xml
provides additional deployment information for a message driven bean deployed within this JAR file.
The presence of this element indicates that the application contains customized deployment settings for a message driven bean.
message-driven-descriptor
Use the message-driven-descriptor
element in weblogic-ejb-jar.xml
.
"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to define the JNDI location of the connection factory to use. The JMS Destination Connection Factory is specified in this attribute. The syntax is java:comp/resource
+ resource provider name + TopicConnectionFactories
OR QueueConnectionFactories
+ user defined name. The nnnConnectionFactories
details what type of factory is being defined.
connection-factory-jndi-name
Use connection-factory-jndi-name
of the message-driven-descriptor
element in weblogic-ejb-jar.xml
.
"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to specify how often the listener thread tries to re-acquire the JMS session once database failover has occurred. This is applicable to only container-managed transactions in an MDB.
None.
A dequeue-retry-count
is specified for an MDB to configure number of attempts to restart the listener thread to the destination when OC4J detects the destination is down.
There is no direct equivalent in Oracle WebLogic Server. This feature was intended to support failover for Oracle AQ and would be a resource-adapter-specific setting in Oracle WebLogic Server.
N/A
Use this attribute of the <message-driven-deployment>
element to specify the interval between retries
None.
A dequeue-retry-interval
is specified for an MDB to configure the time interval between attempts to restart the listener thread to the destination when OC4J detects the destination is down.
There is no direct equivalent in Oracle WebLogic Server. This feature was intended to support failover for Oracle AQ and would be a resource-adapter-specific setting in Oracle WebLogic Server.
N/A
Use this attribute of the <message-driven-deployment>
element to define the JNDI location of the destination (queue/topic) to use.
The JMS Destination is specified in the destination-location
attribute. The syntax is java:comp/resource
+ resource provider name + Topics OR Queues + Destination name. The Topic or Queue details what type of Destination is being defined. The Destination name is the actual queue or topic name defined in the database.
destination-jndi-name
Use the destination-jndi-name
element of the message-driven-descriptor
in weblogic-ejb-jar.xml
.
"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to concurrently consume JMS messages. The default is one thread. Topics can only have one thread. Queues can have more than one.
max-beans-in-free-pool
Oracle WebLogic Server supports a variety of approaches for controlling thread management depending on the resource adapter in use.
"MDBs and Concurrent Processing" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to set the maximum number of times OC4J will attempt the immediate redelivery of a message to a message-driven bean's onMessage
method if that method returns failure (fails to invoke an acknowledgment operation, throws an exception, or both).
After this number of redeliveries, the message is deemed undeliverable and is handled according to the policies of your message service provider. For example, OEMS JMS will put the message on its exception queue (jms/Oc4jJmsExceptionQueue
).
None.
A max-delivery-count
is specified for an MDB to specify the maximum number of attempts to deliver the same message in the event of failure. Oracle WebLogic Server does not support setting this option on a per-MDB basis.
Oracle Fusion Middleware Programming JMS for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to define the name of the resource adapter instance that this MDB uses. Applicable only if this MDB is using a J2CA message service provider. In order for the MDB to be activated by messages received by the resource adapter, the MDB and resource adapter must be connected.
resource-adapter-jndi-name
Use resource-adapter-jndi-name
of message-destination-descriptor
element in weblogic-ejb-jar.xml
.
"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server
Use this attribute of the <message-driven-deployment>
element to define the name of the topic to which this message-drive bean subscribes.
None.
If a resource adapter is used, and it supports the subscription-name
property, then it must be specified using an activation-config-property
element in ejb-jar.xml
. Oracle WebLogic Server does not support setting this property in weblogic-ejb-jar.xml
.
N/A
Use this attribute of the <message-driven-deployment>
element to .
A dequeue-retry-count
is specified for MDB to configure number of attempts to restart the listener thread to the destination when OC4J detects the destination is down.
There is no direct equivalent in Oracle WebLogic Server. This feature was intended to support failover for Oracle AQ and would be a resource-adapter-specific setting in Oracle WebLogic Server.
N/A
The <config-property>
element is only used if you are using a J2CA message service provider. Use this element to set J2CA resource adapter configuration properties. When OC4J deploys an MDB configured to use a J2CA message service provider, OC4J provides the MDB's activation specification to the resource adapter. This specification includes the properties you set in the <config-property>
element.
Alternatively, for an EJB 3.0 message-driven bean, you can set J2CA resource adapter configuration properties using @MessageDriven attribute configProperty
and @ActivationConfig annotation.
You can use the orion-ejb-jar.xml
file <config-property>
configuration to override @MessageDriven configuration.
None.
Oracle WebLogic Server does not support overriding activation config properties via weblogic-ejb-jar.xml
. These settings must be merged with the normal activation config properties located in the ejb-jar.xml
file.
N/A