• Home
  • Shell
    • Emacs
    • Perl
    • screen
    • sed
  • Ubuntu
    • VNC
  • Web Development
    • Javascript
    • Joomla
    • MySQL
    • osTicket
  • Windows
    • Gimp

Creating a Deployment Plan in Oracle WebLogic

Oct10
2013
Written by Ben Garin

Deployment Plans

Deployment plans can be used by administrators to override application settings and variables without modifying the actual jar/war/ear file contents.

Creation

Creating a deployment plan for a deployed application.

  1. Open a Web browser and go to http://<hostname>:<port>/console.
  2. Log in as the administrator.
  3. In the Change Center, click Lock & Edit to enable configuration changes.
  4. Navigate to <domain_name>, then Deployments.
  5. Click on the <application_name> you are creating a deployment plan for.
  6. Click on the Configuration tab.
  7. Click Save.
  8. Enter the path and name of the deployment plan and Click OK.
  9. In the Change Center, click Release Configuration.

Customization

Customizing a deployment plan involves 2 parts, creating variables and assigning them.

Creating Variables:

Variable definitions should be entered below <application-name> inside the <variable-definition> tag.
Each variable requires a <name> and <value> tag.

Example:

 <application-name>upload</application-name>
<variable-definition>
<variable>
<name>secureCookie</name>
<value>true</value>
</variable>
</variable-definition>

Assigning Variables:

Variable assignment needs to take place in the correct <root-element>, which in most cases is weblogic-web-app.
Depending on the variable assignment, it needs to be in the correct <uri> tag. The example below shows a variable assignment which would normally exist in the WEB-INF/weblogic.xml file.
Each variable assignment requires a <name> and <xpath>. The <name> is the name of the variable with a value created above and the <xpath> is the context path or tags in which the variable exists.

So normally in the weblogic.xml file this would look like:

<weblogic-web-app>
<session-descriptor>
<cookie-secure>SOME_VALUE</cookie-secure>
</session-descriptor>
</weblogic-web-app>

But in the <xpath> each tag is separated by a / resulting in:

/weblogic-web-app/session-descriptor/cookie-secure

Example:

 <root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>secureCookie</name>
<xpath>/weblogic-web-app/session-descriptor/cookie-secure</xpath>
</variable-assignment>

Full Deployment Plan Example:

<?xml version='1.0' encoding='UTF-8'?>
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>upload</application-name>
<variable-definition>
<variable>
<name>secureCookie</name>
<value>true</value>
</variable>
</variable-definition>
<module-override>
<module-name>SOME_APPLICATION.ear</module-name>
<module-type>ear</module-type>
<module-descriptor external="false">
<root-element>weblogic-application</root-element>
<uri>META-INF/weblogic-application.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>application</root-element>
<uri>META-INF/application.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>wldf-resource</root-element>
<uri>META-INF/weblogic-diagnostics.xml</uri>
</module-descriptor>
</module-override>
<module-override>
<module-name>SOME_APPLICATION.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
<variable-assignment>
<name>secureCookie</name>
<xpath>/weblogic-web-app/session-descriptor/cookie-secure</xpath>
</variable-assignment>
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
</module-descriptor>
</module-override>
<config-root>DOMAIN_HOME/servers/AdminServer/upload/plan</config-root>
</deployment-plan>
Posted in Web Development
« Middleware> Secure Liferay Session Cookie (JSESSIONID) in WebLogic
» osTicket> “First Client” Theme

Corrections? Questions? Comments?

Find an error?
Everything work out great for you?
Have some feedback?
Like to see something added to the article?

PLEASE leave us a comment after the article and let us know how we are doing, or if something needs corrected, improved or clarified.

Thank you!
- The Management

Advertisement

Sudo Bash
By Geeks - For Geeks

Back to Top