Thursday, November 1, 2012

Exporting Weblogic Configuration

Exporting Weblogic Configuration

The following oracle link gives good description on how to export weblogic configurations into a deployment plan:


Essentially, what is needed is to execute the following command under DOS prompt:
java weblogic.PlanGenerator -root /appRelease/MyApplication -all  

Someone asked: how do I execute this?

(1) ensure java.exe is in your path. or do something like the following:
E:\oracle\portal\java\jdk1.7.0_04\bin\java -cp weblogic.jar weblogic.PlanGenerator -root e:\exportapps\myApplication


 (2) find out where weblogic.PlanGenerator is so that you can run it using java.
It looks like a class. Perhaps in a jar? You can search using windows explorer and make sure search for text not just file name so that the windows searcher will look inside jars.
 Windows search reveals that  weblogic.PlanGenerator is a class insider weblogic.jar.

(3) make sure include the jar in your classpath.  -cp weblogic.jar adds the jar into your classes.
if you need to include multiple jars, do the following:
-cp jar1;jar2;jar3

Weblogic: Creating and Update a Deployment Plan

 Weblogic: Creating and Update a Deployment Plan


Oracle's documentation on writing a deployment plan is very poor. It may take quite an effort to finally understand how to write one properly.

I find the following links are very helpful:

http://middlewaremagic.com/weblogic/?p=5144

http://middlewaremagic.com/weblogic/?p=6168

Just found this Oracle doc on how to create Deployment plan:
https://blogs.oracle.com/jamesbayer/entry/11gr1_update_and_a_deployment

http://docs.oracle.com/cd/E12839_01/web.1111/e13702/config.html

http://docs.oracle.com/cd/E15315_09/help/oracle.eclipse.tools.weblogic.doc/html/deploymentPlanEditor.html

Some more useful links to read for fun!
http://biemond.blogspot.ca/2009/04/using-weblogic-deployment-plan-to.html

http://m-button.blogspot.ca/2008/08/how-to-use-deployment-plan.html





Weblogic: Deploy and Use Shared Library


If you have 2 jars which I need to deploy onto a Weblogic Managed Server so that one of your applications can use the functions provided in these 2 jars. How do you do it?

The following describes what I did:
(1) deploy these two jars as library onto the target weblogic server. Write down the name of the deployment, for illustration purpose, let us say: Jar1, Jar2

(2) Find the weblogic-application.xml of the application which wants to make uses of the functions in the 2 jars. Add the following into the weblogic-application.xml file:



   Jar1

   Jar2
 
This essentially adds the 2 deployed jars onto the classpath of the application so
that the application can reference it.  Restart the server, it should work.

Note that the following is incorrect, will result the system looking for version of Jar1.



   Jar1
   Jar2
 
 
Below is Oracle link on this topic. Check it out:
 
http://docs.oracle.com/cd/E13222_01/wls/docs92/programming/libraries.html