Anda di halaman 1dari 26



This documentation describes in detail how to install and use Oracle WebLogic SmartUpgrade for upgrading Java EE applications from Oracle Application Server to WebLoigc Server. Oracle WebLogic SmartUpgrade is part of the Oracle Fusion Middleware 11g upgrade tools that were designed to maximize the automation of the upgrade process, minimize the application downtime and allows for rapid and seamless uptake of the Oracle Fusion Middleware 11g features and capabilities. The comprehensive documentation and guides could be found here: Currently, WebLogic SmartUpgrade is general available as 11g Release 1 Patchset 1 (

Oracle WebLogic SmartUpgrade could be downloaded according to the Oracle Technology Network development license.

Oracle WebLogic SmartUpgrade download package contains both command line tool and the JDeveoper extensions. The command line upgrade tool is packaged as; and the JDeveloper extensions are packaged as Each zip file includes a readme.txt in which it gives the details of how to install and use the upgrade tool through its respective interface. If WebLogic SmartUpgrade has been installed previously, the environment will need to be cleaned by deleting both C:\WLS1031\jdeveloper\modules\oracle.smartupgrade.weblogc and C:\WLS1031\jdeveloper\jdev\extensions\oracle.jdeveloper.smartupgrade.weblogic.jar before unzipping the new zip file.

The option of "migrate your previous settings" shouldnt be selected during the starting process.

A new upgrade application could be started by clicking File->New in JDeverloper and then selecting Java EE Upgrade Application in the Application gallery.

Click OK.

The application could be named with the desired value or with the default.

Click Next

The project could be named with the desired value or with the default. Click Next.

The OracleAS deployment archives could be located by clicking the green +. The upgrade report identifies artifacts and metadata that need to be upgraded to WebLogic proprietary forms and provides assistance where possible. Any Java EE application that was deployed to OracleAS 10.1.3.x or 10.1.2.x could be used for the upgrade project. All the Java EE applications that were deployed to OracleAS 10.1.3.x or 10.1.2.x could be upgraded with WebLogic SmartUpgrade.

There are different options that could be selected on this page. When generating an upgrade report into an existing project, an Oracle Application Server configuration home could be specified to be included as part of the report. Additionally, both the server home and OracleAS enterprise archives can be localized into the JDevelopoer project file system by checking "Copy OC4J Deployment Archives Into Project". Click the Advanced button.

The advanced options give the capability of specifying categories to be executed during the generation process. It also gives the option of upgrading OracleAS versions. Click Cancel, so it will take the default settings. Check the Generate Artifacts box.

Click Finish. The advisory reports and the configuration artifacts will be generated. The generated artifacts will be located at the JDeveloper project mywork directory.

If the Web Services applications were detected in the specified deployment archive(s); some additional properties will need to be specified.

Here are some sample properties to select and some of them are mandatory. Generate Instrumented Code for Performance Analysis -- The flag (true/false) to indicate if the generated wrapper ("glue") code should be instrumented for performance analysis. Package Upgraded Application -- The flag (true/false) to indicate if the target upgraded application needs to be packaged into a deployable archive. Target Server Home Directory This is a mandatory property. It should point to the location of a Weblogic Server installation, for example, C:\wlhome\wlserver_10.3. Note: you cannot use Weblogic Server bundled with JDeveloper. You can specify 'targetStackHome' property before invoking artifact generation. Alternatively, you can set environment variable WL_HOME before starting your upgrade tool (command line or JDeveloper), which will be the default target server location for all upgrade actions. There are many other properties that could be used for debugging, logging, and some advanced operations. Click Finish.

At the reporting page, the upgrade metrics summary shows the details of the upgrade point findings with detailed information provided on priorities and complexities. These will help the customers planning the upgrade project accordingly.

Using the report of the data-sources.xml findings as the example. This high complexity finding tells the customer that the managed data source used with OracleAS will need to be converted to a WebLogic Server data source; so the application could be successfully deployed to a WebLogic environment. The Reason, Advice and Implication sections give all the details of the actions that will need to take to be able to make the correct changes. After a new data source created for the WebLogic Server, some of the configuration elements will need the additional tuning to keep all the existing functionalities for the application. Some of the configuration options with OracleAS may not have the equivalents in WebLogic, these are also covered in the implication section with further advices.

Here is the example reporting:

An OC4J Managed Data Source named 'jdev-connection-managed-INSDB' was encountered. The OC4J Data Source Connection Pool inactivity-timeout is the amount of time (in seconds) that an unused connection is inactive before it is removed from the pool. It is set to '1000'. It does not

have a direct equivalent in Oracle WebLogic Server. However, you may be able to use the shrink-frequency-seconds to achieve the same behavior.


All the OracleAS public, private dependencies and the third-party dependencies are covered in the advisory report as well.

The artifacts generated could be found at the Jdeveloper project directory. For example: C:\JDeveloper\mywork\Application20\Project1\gen_src\itweb-ins-app_ear.d\itweb-view_war.d Here is the example of the generated deployment descriptor, weblogic.xml.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <weblogic-web-app> <!-- Generated by Oracle SmartUpgrade ( --> <session-descriptor> <!-Rule: Oracle Web Deployment Descriptor - persistence-path Artifact: C:\upgrade\itweb-ins-app.ear:it-web-view.war:WEBINF/orion-web.xml Location Details: /orion-web-app[@persistence-path] --> <persistent-store-dir>applicationStore/</persistent-store-dir> <persistent-store-type>file</persistent-store-type> </session-descriptor> - <virtual-directory-mapping> - <!-Rule: Oracle Web Deployment Descriptor - virtual-directory Artifact: C:\upgrade\itweb-ins-app.ear:it-web-view.war:WEBINF/orion-web.xml Location Details: /orion-web-app/virtual-directory --> <local-path>/lib/icons/</local-path> <url-pattern>/icons/</url-pattern> </virtual-directory-mapping> </weblogic-web-app> -

The automated Web Services migration tool was designed to help the customers dealing with the most time consuming efforts in the upgrade projects. It can migrate an Oracle 10.1.2.x, 10.1.3.x


web services into WLS 10.3 JAX-RPC web service, by generating glue code around the existing implementation. Current supported features: Upgrading POJO based Oracle 10.1.3.* web service into Weblogic 10.3 JAX-RPC web service* - Aimed at zero code change. EAR to EAR and WAR to WAR. Upgrading POJO based Oracle 10.1.2.* web service into Weblogic 10.3 JAX-RPC web service* - Aimed at zero code change. EAR to EAR and WAR to WAR. Upgrading EJB2.* based Oracle 10.1.3.* web service into Weblogic 10.3 JAX-RPC web service* - Aimed at zero code change. EAR to EAR and WAR to WAR. o EJB2.* is migrated to run on WLS Web service becomes POJO that delegates the call to EJB

Upgrading Oracle 10.1.3.* EJB30 based web services. Note: 1. 2.

The JDK 1.6 is required for Web Services migration. You will need to set up the environment variable for JAVA_HOME by doing following. Right click on My Computer -> Properties -> Advanced -> Environment Variables and set JAVA_HOME=<WLS_HOME>\jrockit_160_05_R27.6.2-20

Here, it shows the sample output:


26:05 WARNING - Detecting policy is not yet supported; Please use :qos 26:05 INFO - Unzipping file:C:\upgrade\WS\..\AgentService.ear at:C:\upgrade \WS\Agent.out\exploded\AgentService 26:05 INFO - No of wars found:1 26:05 INFO - No of EJB JARS found:0 26:05 INFO - Source application stack is:OC4J1013 26:08 INFO - Source migration plan successfully generated at:C:\upgrade\WS \Agent.out\config.xml 26:08 INFO - ================================================== 26:09 INFO - The classpath has been successfully validated. 26:09 INFO - Using WLS wsdlc to generate wsdl to java artifacts. 26:09 INFO - This may take a while if you have more services.. 26:34 INFO - Generating Weblogic web service deployment descriptors. 27:06 INFO - Target migration plan generated successfully at:C:\upgrade\WS \Agent.out\outConfig.xml 27:06 INFO - ================================================== 27:11 INFO - Generating glue code... 27:11 INFO - Creating file at:C:\upgrade\WS\Agent.out\intermediate \AgentService\AgentService_AgentServicePort\com\oracle \webservices\interop\ 27:11 INFO - Creating file at:C:\upgrade\WS\Agent.out\intermediate \AgentService\AgentService_AgentServicePort\com\oracle \webservices\interop\ 27:12 INFO - Glue code implementations successfully generated. 27:12 INFO - Compiling glue code for port AgentServicePort 27:22 INFO - Compilation is successful. 27:22 INFO - Merging web.xml at C:\upgrade\WS\Agent.out\final\AgentService \AgentService-web\WEB-INF\web.xml 27:22 INFO - Merging weblogic-webservices.xml at C:\upgrade\WS\Agent.out \final\AgentService\AgentService-web\WEB-INF \weblogic-webservices.xml 27:22 INFO - Merging webservices.xml at C:\upgrade\WS\Agent.out\final \AgentService\AgentService-web\WEB-INF\webservices.xml 27:23 INFO - -> Creating war at :C:\upgrade\WS\Agent.out\final\AgentService \AgentService-web.war 27:33 INFO - -> Created C:\upgrade\WS\Agent.out\final\AgentService.ear


The AgentService.ear, as the example has been successfully migrated and packaged. Lets try to deploy it to WebLogic Server.

The upgraded application could be deployed to any WebLogic Admin or Managed Servers. On the deployments page, click install.


Click upload your file(s) Browse your application and load it to the deployment Path. Click Next



Click Next Leave Install this deployment as an application checked. Click Next and take all the defaults at this page.

Click Finish


At the Deployments page, click to open AgentService and click the Web Services


Click Testing tab and open


Click ?WSDL, the wsdl file looks like following.

Go back to the Testing page, click Test client. The operations show on this page.


At the bottom of the WLS server started DOS window, the following url for performance analysis will show: file:///C:/WLS1031/user_projects/domains/auctionDev/AgentServicePortImpl.html Open this page at the browser.


Go back the Test client window and select to do some operations.

A few different operations could be invoked and re-invoked. After all the process, lets go back to the performance analysis window and refresh the browser. What we could see here is that theres minor performance overhead, such as 10 100 ms.


Lets go back to the Test client page and repeat the same operations again, then go back to the performance analysis page. What we see here is after the first round of the operations, the performance overhead has decreased under ms. The reason is that during the first set of the operations, it does get the performance impact from classloading.