A orion-web.xml and orion-ejb-jar.xml Upgrade Reference

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:


orion-web.xml

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.


<classpath>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"Creating Shared Java EE Libraries and Optional Packages" in the Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server


<contextParamMappingFinding>

OC4J Definition

Overrides the value specified through a corresponding <context-param> element in web.xml for a servlet context parameter.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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")
More Information

"ServletConfig" Java servlet interface in the Java 2 Platform, Enterprise Edition, v 1.3 API Specification on the java.sun.com Web site


<mimeMappings>

OC4J Definition

Defines the path to a file containing MIME mappings.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"web.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<virtual-directory>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

<virtual-directory-mapping>

Upgrade Advice

Create an equivalent <virtual-directory-mapping> entry in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<access-mask>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"Using Network Connection Filters" in the Oracle Fusion Middleware Programming Security for Oracle WebLogic Server


<servlet-chaining>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"The Essentials of Filters" on the java.sun.com Web site.


<request-tracker>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"Servlet Life Cycle" in the J2EE 1.4 Tutorial on the java.sun.com Web site.


<session-tracking>

OC4J Definition

Specifies the session-tracking settings for this application.

Session tracking is accomplished through cookies, assuming a cookie-enabled browser.

Equivalent Entry in weblogic.xml

<session-descriptor>

Upgrade Advice

Use the <session-descriptor> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<session-tracker>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

Create a standard HttpSessionListener that contains the functionality of the session tracker servlet.

More Information

"Servlet Life Cycle" in the J2EE 1.4 Tutorial on the java.sun.com Web site.


<resource-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

<resource-description>

Upgrade Advice

Use the <resource-description> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<lookup-context>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"Configuring Foreign Server Resources to Access Third-Party JMS Providers" in Oracle Fusion Middleware Configuring and Managing JMS for Oracle WebLogic Server


<resource-env-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

<resource-env-description>

Upgrade Advice

Use the <resource-env-description> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<env-entry-mapping>

OC4J Definition

Overrides the value specified through a corresponding <env-entry> element in web.xml, for an environment entry.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"web.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<ejb-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

<ejb-reference-description>

Upgrade Advice

Use the <ejb-reference-description> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<service-ref-mapping>

OC4J Definition

Use this element in conjunction with a <service-ref> element that appears in the web.xml file to declare a Web service.

Equivalent Entry in weblogic.xml

<service-ref-description>

Upgrade Advice

Use the <service-ref-description> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<expiration-setting>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

None.


<jazn-web-app>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

Oracle Fusion Middleware Understanding Security for Oracle WebLogic Server

"Enable Cross Domain Security between domains" in the Oracle WebLogic Server Administration Console online help


<security-role-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic.xml

<security-role-assignment>

Upgrade Advice

Use the <security-role-assignment> element in weblogic.xml. The security role name should be created in the destination Oracle WebLogic Server domain.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.


<web-app-class-loader>

This section describes the attributes supported by the OC4J <web-app-class-loader> element in the orion-web.xml deployment descriptor.

search-local-classes-first

OC4J Definition

Set this to "true" to search and load WAR file classes before system classes. By default, system classes are searched and loaded first.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"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

include-war-manifest-class-path

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"Creating Shared Java EE Libraries and Optional Packages" in Oracle Fusion Middleware Developing Applications for Oracle WebLogic Server

autojoin-session

OC4J Definition

Specifies whether users should be assigned a session as soon as they log in to the application.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

None.

default-buffer-size

OC4J Definition

Specifies the default size of the output buffer for servlet responses, in bytes.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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%>.

More Information

None.

default-charset

OC4J Definition

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.

Equivalent Entry in weblogic.xml

jsp-descriptor/encoding

Upgrade Advice

Use the jsp-descriptor/encoding configuration in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

default-mime-type

OC4J Definition

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.

Equivalent Entry in weblogic.xml

container-descriptor/default-mime-type

Upgrade Advice

Use the container-descriptor/default-mime-type configuration in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

development

OC4J Definition

Use this OC4J-specific flag during development; it prompts the OC4J server to check a particular directory for updates to servlet source files.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

directory-browsing

OC4J Definition

This attribute specifies whether to allow directory browsing for a URL that ends in "/".

Equivalent Entry in weblogic.xml

container-descriptor/index-directory-enabled

Upgrade Advice

Use the container-descriptor/index-directory-enabled configuration in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

enable-jsp-dispatcher-shortcut

OC4J Definition

This OC4J-specific flag for performance tuning in conjunction with a "true" setting for the simple-jsp-mappingattribute.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

No equivalent in Oracle WebLogic Server.

More Information

None.

file-modification-check-interval

OC4J Definition

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.

Equivalent Entry in weblogic.xml

container-descriptor/index-directory-enabled

Upgrade Advice

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.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

jsp-cache-directory

OC4J Definition

Specifies the JSP cache directory, which is used as a base directory for output files from the JSP translator.

Equivalent Entry in weblogic.xml

jsp-descriptor/workingDir

Upgrade Advice

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.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

jsp-cache-tlds

OC4J Definition

Indicates whether persistent TLD caching is enabled for JSP pages.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

None.

jsp-print-null

OC4J Definition

Set this flag to "false" to print an empty string instead of the default "null" string for null output from a JSP page.

Equivalent Entry in weblogic.xml

jsp-descriptor/print-nulls

Upgrade Advice

Use the print-nulls attribute of the <jsp-descriptor> element in weblogic.xml.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

jsp-taglib-locations

OC4J Definition

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).

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

There is no need to upgrade this configuration, because Oracle WebLogic Server supports TLD caching, and TLD caching is ON by default.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server

jsp-timeout

OC4J Definition

Specifies a period of time after which any JSP page will be removed from memory if it has not been requested.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

None.

persistence-path

OC4J Definition

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.

Equivalent Entry in weblogic.xml
  • persistent-store-type attribute of the session-descriptor element

  • save-sesssions-enables attribute of the container-descriptor element

Upgrade Advice

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.

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server

schema-major-version

OC4J Definition

The major version number of the orion-web.xml XSD.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

Not required in Oracle WebLogic Server.

More Information

None.

schema-minor-version

OC4J Definition

The minor version number of the orion-web.xml XSD.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

None.

More Information

None.

servlet-webdir

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

Configure standard servlet and servlet-mapping declarations from the servlet specification to configure weblogic.servlet.ServletServlet.

More Information

"Creating and Configuring Servlets" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server

simple-jsp-mapping

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

This is performance tuning flag for OC4J JSP container and is not required in WebLogic Server.

More Information

None.

source-directory

OC4J Definition

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.

Equivalent Entry in weblogic.xml
  • page-check-seconds attribute of the jsp-descriptor element

  • servlet-reload-check-secs attribute of the container-descriptor element

Upgrade Advice

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."

More Information

"weblogic.xml Deployment Descriptor Elements" in Oracle Fusion Middleware Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server.

temporary-directory

OC4J Definition

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.

Equivalent Entry in weblogic.xml

None.

Upgrade Advice

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.

More Information

"ServletContext" Java servlet interface in the Java 2 Platform, Enterprise Edition, v 1.3 API Specification on the java.sun.com Web site


orion-ejb-jar.xml

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.


<session-deployment>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml
  • stateless-session-descriptor

  • stateful-session-descriptor

Upgrade Advice

Session bean customization in Oracle WebLogic Server is accomplished via the stateless-session-descriptor and stateful-session-descriptor elements.

More Information

"stateless-session-descriptor" and "stateful-session-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

copy-by-value

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

enable-call-by-reference

Upgrade Advice

Specify the copy by value semantics in weblogic-ejb-jar.xml using the enable-call-by-reference element.

More Information

"enable-call-by-reference" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

idletime

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

stateful-session-cache/idle-timeout-seconds

Upgrade Advice

Use the stateful-session-cache/idle-timeout-seconds element of stateful-session-descriptor to set the idle timeout in weblogic-ejb-jar.xml.

More Information

"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

min-instances

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

initial-beans-in-free-pool

Upgrade Advice

Set the minimum size of a bean pool in weblogic-ejb-jar.xml using the initial-beans-in-free-pool element.

More Information

"Pooling for Stateless Session EJBs" Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

max-instances

OC4J Definition

This attribute of the <session-deployment> element is the presence of this attribute indicates that the application contains customized bean pooling settings

Equivalent Entry in weblogic-ejb-jar.xml

max-beans-in-free-pool

Upgrade Advice

Set the maximum size of a bean pool in weblogic-ejb-jar.xml using the max-beans-in-free-pool element

More Information

"Pooling for Stateless Session EJBs" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

max-instances-threshold

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

max-beans-in-cache

Upgrade Advice

Use the stateful-session-cache/max-beans-in-cache element of stateful-session-descriptor to set the idle timeout in weblogic-ejb-jar.xml.

More Information

"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

max-tx-retries

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

retry-methods-on-a-rollback/retry-count

Upgrade Advice

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.

More Information

"retry-methods-on-rollback" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

resource-check-interval

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

Not supported by Oracle WebLogic Server.

More Information

N/A

passivate-count

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

Not supported in Oracle WebLogic Server.

More Information

N/A

persistence-filename

OC4J Definition

Use this attribute of the <session-deployment> element to define the path to the file where sessions are stored across restarts.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

This is not supported by Oracle WebLogic Server; however, you might be able to use an Oracle WebLogic Server custom persistent store.

More Information

"Specifying the Persistent Store Directory for Passivated Beans" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

pool-cache-timeout

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xm

idle-timeout-seconds

Upgrade Advice

Set the timeout value of a bean pool in weblogic-ejb-jar.xml using the idle-timeout-seconds element.

More Information

"Pooling for Stateless Session EJBs" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

timeout

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

stateful-session-cache

Upgrade Advice

Use the stateful-session-cache/session-timeout-seconds element of stateful-session-descriptor to set the session timeout in weblogic-ejb-jar.xml.

More Information

"stateful-session-cache" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

transaction-timeout

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

transaction-descriptor element and its trans-timeout-seconds child element

Upgrade Advice

Set the transaction timeout for an EJB in weblogic-ejb-jar.xml using the transaction-descriptor/trans-timeout-seconds element and child element.

More Information

"transaction-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<ejb-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

ejb-reference-description

Upgrade Advice

Set the JNDI location mapping for an EJB reference using the ejb-reference-description element in weblogic-ejb-jar.xml.

More Information

"ejb-reference-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<resource-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

resource-description

Upgrade Advice

Set the JNDI location mapping for a resource reference using the resource-description element in weblogic-ejb-jar.xml.

More Information

"resource-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<resource-env-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

resource-env-description

Upgrade Advice

Set the JNDI location mapping for a resource environment reference using the resource-env-description element in weblogic-ejb-jar.xml.

More Information

"resource-env-description" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<message-destination-ref-mapping>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

message-destination-descriptor

Upgrade Advice

Set the JNDI location mapping for a message destination mapping using the message-destination-descriptor element in weblogic-ejb-jar.xml.

More Information

"message-destination-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<session-type>Stateful</session-type>

OC4J Definition

This value for the session-type element indicates that the application contains a stateful session bean.

Equivalent Entry in weblogic-ejb-jar.xml

stateful-session-cache/cache-type

Upgrade Advice

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.

More Information

"Stateful Session EJB Passivation" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server


<message-driven-deployment>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

message-driven-descriptor

Upgrade Advice

Use the message-driven-descriptor element in weblogic-ejb-jar.xml.

More Information

"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

connection-factory-location

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

connection-factory-jndi-name

Upgrade Advice

Use connection-factory-jndi-name of the message-driven-descriptor element in weblogic-ejb-jar.xml.

More Information

"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

dequeue-retry-count

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

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.

More Information

N/A

dequeue-retry-interval

OC4J Definition

Use this attribute of the <message-driven-deployment> element to specify the interval between retries

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

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.

More Information

N/A

destination-location

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

destination-jndi-name

Upgrade Advice

Use the destination-jndi-name element of the message-driven-descriptor in weblogic-ejb-jar.xml.

More Information

"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

listener-threads

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

max-beans-in-free-pool

Upgrade Advice

Oracle WebLogic Server supports a variety of approaches for controlling thread management depending on the resource adapter in use.

More Information

"MDBs and Concurrent Processing" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

max-delivery-count

OC4J Definition

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).

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

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.

More Information

Oracle Fusion Middleware Programming JMS for Oracle WebLogic Server

resource-adapter

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

resource-adapter-jndi-name

Upgrade Advice

Use resource-adapter-jndi-name of message-destination-descriptor element in weblogic-ejb-jar.xml.

More Information

"message-driven-descriptor" in the Oracle Fusion Middleware Programming Enterprise JavaBeans for Oracle WebLogic Server

subscription-name

OC4J Definition

Use this attribute of the <message-driven-deployment> element to define the name of the topic to which this message-drive bean subscribes.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

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.

More Information

N/A

wrapper-class

OC4J Definition

Use this attribute of the <message-driven-deployment> element to .

Equivalent Entry in weblogic-ejb-jar.xml
Upgrade Advice

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.

More Information

N/A


<config-property>

OC4J Definition

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.

Equivalent Entry in weblogic-ejb-jar.xml

None.

Upgrade Advice

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.

More Information

N/A