Migrating Application From Weblogic Server 8.1 to Weblogic Server 10.3

Migrating Application From Weblogic Server 8.1 to Weblogic Server 10.3




Introduction

Oracle WebLogic Server 10.3 came up with lots of advancements and features to make this application server f a better choice for building and deploying and sets of. It supports high Internet Application (RIA) via the new server-side HTTP publish-subscribe engine. Oracle attempts to make this version compatible with past versions of WebLogic Server in the areas of persistent data, generated classes, and API compatibility.

JDK 1.4 Vs JDK 1.6

As you will be upgrading code from JDK 1.4 to 1.6, some of the important features which were not present in JDK 1.4 are Generics

Generics is a characterize additional in the JDK1.5 for adding compile-time kind safety to the Collections Framework.While taking an component out of a Collection, you must cast it to the kind of component that is stored in the collection. This is unsafe in addition as inconvenient also. This casting can fail at run time as compiler does not check whether your cast is same as collection kind or not.

You have to communicate the kind of a collection to the compiler to avoid above situation. Generics provide a way for you to communicate the kind of a collection to the compiler, so that it can be checked. Once the compiler knows the component kind of the collection, the compiler can check that you have used the collection consistently and can insert the correct casts on values being taken out of the collection.

Enhanced for Loop

This newly additional characterize eliminates the use of iterators and index variables when iterating over collections and arrays.

Autoboxing/Unboxing

Autoboxing is basically automatic conversion of early types to their equivalents. Like automatic conversion of (int, float, double etc.) to (Integer, Float, Double,…).

The reverse course of action of autoboxing is called Unboxing. Unboxing is automatic conversion of wrapper types to their early equivalents for assignments or method or constructor invocations.

Typesafe Enums

This flexible object-oriented enumerated kind facility allows you to create enumerated types with haphazard methods and fields. It provides all the benefits of the Typesafe Enum pattern.

Varargs

This facility eliminates the need for manually boxing up argument lists into an range when invoking methods that accept variable-length argument lists.

JDBC Changes

As of WebLogic Server 9.0 and 10.x, the number of JDBC resource types was reduced to simplify JDBC configuration. Now, instead of configuring a JDBC connection pool and then configuring a data source a source to point to the connection pool and bind to the JNDI tree, you can configure a data source that encompasses a connection pool.

Configuring JDBC

In the Domain Structure tree, expand sets > JDBC, then select Data supplies.

Click on New to create a new data Source.

go into Name, JNDI Name for data source.

Database kind:-Select the DBMS of the database that you want to connect to. If your DBMS is not listed, select Other.

Database Driver:-The list will show shared drivers for chosen DBMS. Select the driver you want to use to connect to database.

Here we have chosen Non-XA driver so, we need to select transaction options which will be next screen. If we select XA-driver transaction options will be default(The data source will sustain global transactions and use the ‘Two-Phase Commit’ global transaction protocol).

Click next to continue

Select Transaction options on the above screen. All the options are self explanatory; select them according to your application needs.

Click Next to continue

Now you have to create a connection pool

go into Database Name, great number Name, Port No Database User Name and Password in the above screen and click next to continue

A Test connection screen will open showing the connection details. You can test the configuration by Clicking Test configuration or just click Finish.

JDBC characterize Changes

The following section describes some of the important changes to JDBC sustain:

JDBC 4.0 sustain

WebLogic Server 10.3 supports JDBC 4.0 specification. The WebLogic kind 4 JDBC driver for Oracle has been deprecated in WebLogic Server 10.3 and might be removed in next release. So I would suggest instead of using deprecated driver, you should use the Oracle Thin Driver that comes with WebLogic Server.

Oracle 11g RAC sustain

WebLogic Server 10.3 includes sustain for Oracle 11g and 11g RAC (Real Application Clusters)

JMS configuration changes

Go to Domain, sets, Messaging, JMS Modules.

JMS configurations in this release of weblogic server are a bit different or you can say a bit interesting than WLS8.1. Here you will create a JMS module which contains all the things you are used to working with in 8.1. All the JMS Connection Factories, JMS Queues, distributed destinations, topics etc will go in a JMS module. This gives you the advantage of flexibility while targeting the resources. It also allows you to define application specific JMS modules and only deploy them when the application is deployed.

So, create a JMS module, assign it a name such as MyJMSModule. Now Select targeting options, then add resources to the module. This is where you add the connection factories, queues, topics, distributed destinations and so on.

In the Administration Console, expand sets > Messaging and select JMS Modules

Click New to create a Module. A module named SystemModule is shown here. Don’t get confused with the name System module it’s not default module, its produced for our application.

Name:- go into any name for the JMS module.

Descriptor file Name: optionally go into a name for module’s inner descriptor file. The system will automatically add a “-jms.xml” extension to this name. If you do not provide a name, a default name will be stated.

Location in Domain: optionally, go into where you want to place the descriptor for the system module. The location must be relative to JMS configuration subdirectory of your domain, which is the config/jms subdirectory.

Click on Next to continue

Select the server on to deploy module.

Click Next to continue.

On the above page, indicate whether you want to be able to closest add resources to this JMS Module after it’s produced.

Click Finish.

If you chose not to continue adding resources, the JMS module creation is complete, and you are taken to the JMS Modules summary page where you can access the new module to edit it and add resources to it. However, if you chose to continue adding resources, then you are automatically taken to the JMS Modules: Configuration page where you can continue adding resources to the module.

Click New to add resources.

Select one of the resources which you want to add.

Depending on the kind of resource you select, you will be asked to go into information to create the resource same as you do in past versions.

Uniform Configuration of Distributed Destinations

Uniform Distributed Destination is an interesting characterize for applications using distributed destinations in weblogic Server 9.X and later versions. It helps in simplifying the management and development of distributed applications. Now administrator doesn’t need to create or designate destination members, but relies on the system to uniformly create the necessary members on the JMS servers to which a JMS module is targeted. This characterize ensures the consistent configuration of all distributed destination parameters. The Weighted Distributed Destination characterize is also there for manual fine-tuning of distributed destination members.

While creating distributed queue Leave the Allocate Members Uniformly check box enabled in order for WebLogic Server to uniformly create and allocate the members of this uniform distributed queue.

JSP Compiler

As you might know the in WLS 8.1 JSP compiler uses the javelin to generate byte code. But in this release Java Compiler API’s is used. This characterize should not impact JSP files in existing applications. But this is definitely a reliable JSP compiler as it doesn’t depend on the Javelin framework Java class bytecode generation characterize.

Deployment Descriptors

The weblogic.xml deployment descriptor is now schema-based instead of document kind definition (DTD)-based. You can refer http://edocs.bea.com/wls/docs90/webapp/weblogic_xml.html link for complete reference of the elements in the WebLogic Server-specific deployment descriptor weblogic.xml. You can also refer http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd to see the schema for web.xml.

Upgrading Deployment Descriptors

As this weblogic server uses schema-based instead of document kind definition (DTD)-based descriptors. So to get complete advantage I would suggest upgrading deployment descriptors while migrating application to a new release. A simple tool can be used to get the descriptors upgraded. This tool is known as weblogic.DDConverter.

I would recommend you to put all the generated descriptors in a permanent directory. Inspect the correctness and if they seem fine place them in proper place.

weblogic.DDConverter can be invoked with the following command:

java weblogic.DDConverter [options] archive_file_or_directory

where archive_file_or_directory refers to the EAR, WAR, JAR, or RAR of your application.

The following example shows how to use the weblogic.DDConverter command to generate upgraded deployment descriptors for the test.ear Enterprise application into the subdirectory temp in the current directory:

java weblogic.DDConverter -d temp test.ear

if you get “Exception in thread “main” java.lang.NoClassDefFoundError: weblogic/DDConverter” exception just specify the complete for DDConverter class. Following example is shown using complete path.

java -cp D:beawlserver_10.3serverlibweblogic.jar; weblogic.DDConverter -d temp test.ear

DDConverter is a class inside weblogic.jar, so specify the path of weblogic.jar.

-d specifies the directory for placing generated descriptors files.




leave your comment

Top