Thursday, September 20, 2012

Upgrade JEE Application from Oracle OC4J to Weblogic


Oracle has some nice online reference on this topic:
http://docs.oracle.com/cd/E23943_01/upgrade.1111/e10126/overview_app_migration.htm#CHDFHBGA


First, plan your environment. Determine your hardware requirements (processor power, memory, hard disk size, operating system).

Second, estimate the activities, come out with an estimate of effort. work out the cost, budget and etc. Project Management related tasks.

3. determine the core software versions, sort out the license cost and etc.

4. The following is an example work breakdown on the technical side:

. build development environment, for example, Eclipse, Weblogic 10.3.6, CVS as repository, JDK 7
. upgrade database. Set up database. for example, schemas, Advanced Queues (Queue table, Queues)
. Server software installation and configuration, including creating data transport set from old system;
. update build.xml, library, and etc to get the application code compiled.
. configure local weblogic servers with necessary data sources, JMS AQ configurations.

Set up Oracle AQ (Advanced Queuing) in Weblogic

Problem:

A Portal component,SECURE_MESSAGE, uses Oracle Advanced Queue to communicate with IB.
2 Queues: 1 Sending Queue for sending message
1 Receiving Queue for listening and receiving messages.
The Queues are configured in IB Oracle 11g database.

Portal component uses Spring framework to build the Portlets. Packaged ear file deploys in the Weblogic 11G (10.3.6) container.

We need to configure the queues so that Spring, Weblogic, and Oracle AQ can all work together.

Solution:

Solution is really described in this link:
http://docs.oracle.com/cd/E23943_01/web.1111/e13738/aq_jms.htm

In summary:

AQ JMS uses a database connection and stored JMS messages in a database accessible to an entire WebLogic Server cluster . WebLogic Server installation includes all the necessary classes, no additional files are required in the WebLogic Server classpath.to interoperate with Oracle AQ JMS.

WebLogic AQ JMS uses the WebLogic JMS Foreign Server framework to allow clients to lookup AQ JMS connection factories and destinations using a standard WebLogic JNDI context, and to allow applications and clients to load and invoke AQ JMS using standard Java EE APIs. The required references to the database, JDBC driver, and data source are configured as part of this framework.

For applications running within the WebLogic Server's JVM:

(1) create a WebLogic Data Source.
It references a JDBC driver, pools JDBC connections, and provides connectivity to the Oracle database hosting AQ JMS.

(2) create a WebLogic Foreign Server. It references the data source.

(3) create AQ JMS connection factories and destinations as part of the WebLogic JMS Foreign Server configuration. Local JNDI names are defined for the connection factories and destinations. These JNDI names are configured to map to existing AQ connection factories and destinations.

(4) In turn, WebLogic Server applications, such as MDBs, reference the local JNDI names.