WebLogic Server 6.1 and 5.1 Interoperability
The following document describes the level of interoperability between
WebLogic Servers 5.1 and 6.1 that has become available with the addition
of WebLogic 5.1 Service Pack 12 and WebLogic 6.1 Service Pack 3. It also details how to set up your
systems to achieve interoperability.
Introduction
Restrictions
RMI-IIOP
System Requirements
Installation
Enabling IIOP
Enabling Interoperability
Examples
Introduction
This Service Pack includes an example and the necessary files for achieving interoperability between your 5.1 WebLogic Server and
your 6.1 WebLogic Server. The level of interoperability includes the following:
- EJB - Bi-directional support (i.e. being able to invoke an EJB hosted in one WLS server from another WLS server of a
different version, and vice versa). This support includes all types of 2.0 EJB's hosted on a WebLogic Server 6.1 and all types of 1.1 EJB's hosted on
a 5.1 WebLogic server or a 6.1 WebLogic Server.
- Web Application to EJB - You can call an EJB hosted on WebLogic 5.1 Server from a Servlet or JSP on a WebLogic 6.1 Server, and vice
versa.
- RMI - You can remotely invoke objects hosted on WebLogic Server 5.1 from a 6.1 WebLogic Server, and vice-versa.
-
Security - Security context is propagated from server to server. This feature allows the carry over of
security information about the requesting WebLogic Server to the serving server.
-
Messaging Bridge - You can configure a message forwarding mechanism between any two messaging
products, thereby providing interoperability between WebLogic JMS and another messaging product.
You can use the Messaging Bridge to integrate your messaging applications between:
- Separate releases of WebLogic Server (for example, WebLogic Server 5.1 with release 6.1 or
higher).
- WebLogic JMS implementations that reside in separate WebLogic Server domains (for example, a
WebLogic Server 6.1 domain with another release 6.1 domain).
- WebLogic JMS with a third-party JMS product (for example, WebLogic Server 6.1 and MQSeries).
- WebLogic JMS with non-JMS messaging products (only by using specialized adapters that are not
provided with WebLogic Server).
Restrictions
- This interoperability solution is only for 5.1 Service Pack 12 WebLogic Servers and 6.1 Service Pack 3 or higher WebLogic Servers. Other servers are not supported.
- WebLogic 5.1 does not support EJB 2.0. So any beans you place on your 5.1 WebLogic Server must be 1.1 EJBs in order to be
successfully called by a WebLogic 6.1 Server.
- You cannot modify the admistration of the client server via interoperability. Each server must be administered on it's own.
You cannot
modify your WebLogic 5.1 Server through a WebLogic 6.1 Administration Conosle, or vice-versa.
- JDK 1.3.1 is required, clients running a different JVM may not function.
- Transactions and SSL are not supported between the servers
- If you have WebLogic 5.1 IDL clients, the IDL compiler provided with WebLogic rmic has issues; compile these clients by using
the rmic compiler that is provided with WebLogic 6.1 Service Pack 3 and then use the generated files on your WebLogic 5.1 Server. The
5.1 rmic compiler will be fixed in a future WebLogic 5.1 Service Pack.
- Refresh of connections in a cluster is not supported.
If you are calling into a cluster of WebLogic Servers and one of the managed servers goes down, the connection to that server will not be refreshed until you
reset it yourself.
RMI-IIOP
This solution for inter-server communication is based on the RMI-IIOP model. All calls use the IIOP (the
Internet-Inter-Orb-Protcol). The use of IIOP is standardized based on a specification by the Object-Management-Group at
http://cgi.omg.org/cgi-bin/doc?formal/99-10-07 .
See our guide at
http://e-docs.bea.com/wls/docs61/rmi_iiop/index.html for
further information on the use of RMI-IIOP with WebLogic Server.
System Requirements
WebLogic 6.1 with Service Pack 3 or higher.
WebLogic 5.1 with Service Pack 12 or higher
JDK 1.3.1
Installation
You must have the Service Packs listed above installed. Your WebLogic Server 6.1 includes a 1.3.1 JDK; your 5.1 WebLogic Server
must also have a 1.3.1 JDK it can access.
Enabling RMI-IIOP
WebLogic 5.1 and 6.1 Servers interoperate using RMI-IIOP. T3 and plain RMI protocols are not supported in this
configuration. By default, RMI-IIOP support is enabled with WebLogic. However, you may wish to note the points below:
Enabling Interoperability
The following are the basic steps required to make your 5.1 and 6.1 Weblogic Server interoperate. See the example for a working sample of how this is accomplished.
- Your remote object must have the necessary code that binds it to the JNDI tree of its host server. EJBean homes are bound
to the JNDI tree at the time of deployment and the WebLogic EJB container takes care of this for you. RMI Objects are
typically bound to the JNDI tree with a startup class.
- Modify your lookup of an initial context from the code that calls the EJB or other remote object. You must specify a
provider URL that A) uses the iiop protocol B) refers to the machine name and port on which the EJB or remote object resides.
For example you could change a servlet's lookup of an initial context in the following way:
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, "iiop://gotham:7004");
- Use the
ejbc compiler with the -iiop option on your bean. If you are not using bean but another object use the rmic compiler with the
-iiop option.
You must use a 1.3.1 JDK or higher when doing so. Deploy the object on
the server that you want to host it.
- Whether you are calling an object from a 6.1 server or a 5.1 server, you will need to have certain bean/object classes on
the client server that is doing the calling.
If you are calling from a WebLogic 6.1 Server you must add an entry to the ejb-jar.xml : <ejb-client-jar> . Designate a name
within this tag, such as <ejb-client-jar>my_interop_client.jar</ejb-client-jar> . Including this XML tag will add the remote
interface class that the 6.1 Server needs once you recompile; when this has been done, add the generated client-jar to where it can be
referenced by your WebLogic 6.1 server (either the lib directory of your Web Application or in the classpath). If you are
not calling an EJB but some other type of remote object, just copy the remote interface of your object to where it can be
referenced by your 6.1 Server (either the lib directory of your Web Application or in the classpath).
If you are calling from a WebLogic 5.1 Server you must run ejbc on the bean, using the -clientJar option. The 5.1 Server
needs both the remote interface and stub classes and this option will generate them for you; once this has been done, add the
generated client-jar to where it can be referenced by your WebLogic 5.1 server (either the lib directory of your Web
Application or in the classpath). If you are not calling an EJB but some other type of remote object, just copy the remote
interface and stub classes of your object to where it can be referenced by your 5.1 Server (again, either the lib directory
of your Web Application or in the classpath).
So your basic steps are:
- Copy the bean to some temporary location
- If the client server is a 6.1 WebLogic Server, add
<ejb-client-jar>fooname.jar</ejb-client-jar> to your client side
ejb-jar.xml and run ejbc .
- If the client server is a 5.1 WebLogic Server, add the
-clientJar option to ejbc
when compiling the client side ejb.
- Add this generated client jar to the client server, either reference it in the classpath or add it to the /lib
directory of your web application.
- Compile your Servlet or Web Application with the modified initial context that uses iiop as the protocol for connection to
the EJB or remote object. Note that the client.jar you created in step is needed for this compilation and is required to be
in your classpath.
-
It is required to have a java security setting in order for the servers to talk to each other. Make sure that your startup scripts for
both servers have an appropriate
weblogic.policy or java.policy file specified. For examples::
- Start both servers. Deploy the bean on the targeted server. But do not deploy the jar file that was created on the
client side.
Clustering
WebLogic also supports basic clustering with failover and load balancing while using this interop solution. Your WebLogic 6.1 Server can call into a cluster of 5.1 Servers and access any EJB's hosted there. The
reverse is also true. The only requirements are that you followed the steps above in development; also your EJBs must be set up for clustering (ie
the home-is-clusterable deployment element in weblogic-ejb-jar.xml must be set to true ).
Examples
The necessary files and documentation for WebLogic Server 5.1 to WebLogic Server 6.1 interoperability have been provided with the
required Service Packs. In your Weblogic 5.1 home directory under /examples/iiop/wls2wls
directory are the instructions and WebLogic 5.1 example files. In WebLogic 6.1 the necessary files and instructions
are in your WebLogic 6.1 home directory, under samples/examples/iiop/wls2wls .
|