Configuring Logging on Oracle WebLogic Server

6 Upgrading Application Clients 6-1 6 Upgrading Application Clients When you upgrade your Java EE applications to Oracle WebLogic Server and Oracle Fusion Middleware 11g, the external interfaces exposed by your applications can be affected. In turn, client applications that depend on those interfaces can be affected. The following sections describe the ramifications of upgrade on application clients, as well as guidelines for addressing any the resulting client issues: ■ Impact of Upgrade on Java Server Pages and Servlet Clients ■ Impact of Upgrade on Java Naming and Directory Interface Clients ■ Impact of Upgrade on Enterprise Java Bean Clients ■ Impact of Upgrade on JMS Clients

6.1 Impact of Upgrade on Java Server Pages and Servlet Clients

When an application is upgraded to WebLogic Server, JSP and servlet clients can be affected because of differences in the HTTP session state replication model between Oracle WebLogic Server and OC4J. Unlike OC4J clusters, which can support any number of in-memory replicated copies of the HTTP session state, Oracle WebLogic Server in-memory HTTP session state replication supports only a primary-secondary, two-copy model. In most cases, this difference should have no impact on JSP and Servlet clients; however, for rare cases where an application might explicitly rely on more than two copies of the HTTP session state to be available for its clients, consider using Oracle Coherence. For more information, refer to the information about Oracle Coherence on the Oracle Technology Network OTN:

6.2 Impact of Upgrade on Java Naming and Directory Interface Clients

The following sections describe considerations for clients of upgraded applications that use the OC4J Java Naming and Directory Interface JNDI provider: ■ Modifying Clients to Use the Oracle WebLogic Server JNDI Provider ■ Understanding the Scope of the Oracle WebLogic Server JNDI Namespace 6-2 Oracle Fusion Middleware Upgrade Guide for Java EE

6.2.1 Modifying Clients to Use the Oracle WebLogic Server JNDI Provider

If any clients of your upgraded applications use the OC4J Java Naming and Directory Interface JNDI provider to lookup application interfaces or resources, then you must modify those clients so they use the Oracle WebLogic Server JNDI provider instead. You can change the applications JNDI initial context creation code as follows: 1. Identify all instances of the OC4J JNDI URLs in the client code. Typically the OC4J URL is structured in the following format: prefix:host:RMI_or_OPMN_request_port:oc4j_instanceapplication-name An example URL for an Oracle Application Server 10g installation with an OC4J instance named oc4j1 and a deployed application called myapplication would be as follows: opmn:ormi:127.0.0.1:6003:oc4j1myapplication Note that the prefix can be opmn:ormi for a full Oracle Application Server installation that is using the Oracle Process Management and Notification infrastructure, or it can be just ormi: if you are using a standalone OC4J installation. 2. Change the URL of the provider so it points to the target WebLogic Server domains administration server using the t3 protocol. For example: t3:127.0.0.1:7001 3. Make sure the security credentials are valid within the target Oracle WebLogic Server domain. 4. Change the initial context factory to the Oracle WebLogic Server WLInitialContextFactory class. This class should also be made available to the client applications class loader through a Oracle WebLogic Server client jar file. You create the client jar file wlfullclient.jar using the WebLogic JarBuilder tool. For more information, see the following sections in Oracle Fusion Middleware Programming Stand-alone Clients for Oracle WebLogic Server: ■ WebLogic Full Client ■ Using the WebLogic JarBuilder Tool Note that if the client is itself running within an OC4J server instance, the environment-naming-url-factory-enabled attribute in the servers server.xml may have to be set to true to allow the use of multiple JNDI providers within the same OC4J instance.

6.2.2 Understanding the Scope of the Oracle WebLogic Server JNDI Namespace

Another important difference between the OC4J and Oracle WebLogic Server JNDI providers that might impact client applications is the scoping of JNDI namespaces. OC4J JNDI objects can have an explicit application scope. Therefore, when performing a lookup, OC4J JNDI clients can use a URL which identifies a specific OC4J server instance and includes the name of the target application.