Weblogic 12C - Is there a way to edit deployment plan variables from the console?

We are new to Weblogic (12c). We are trying to choose how we are going to pass some configurations to the application depending on the environment it is running in (dev / staging / prod).

I am currently trying to use a deployment plan. In WEB-INF/web.xml

I have:

<context-param>
    <param-name>test</param-name>
    <param-value>11111</param-value>
</context-param>

      

And I am using plan.xml

for my application in Weblogic. Some parts:

<variable-definition>
    <variable>
        <name>test</name>
        <value xsi:nil="false">22222</value>
        <description>some description</description>
    </variable>
</variable-definition>

      

and

<module-descriptor external="false">
    <root-element>web-app</root-element>
    <uri>WEB-INF/web.xml</uri>
    <variable-assignment>
        <name>test</name>
        <xpath>/web-app/context-param/[param-name="test"]/param-value</xpath>
        <origin>planbased</origin>
        <operation>replace</operation>
    </variable-assignment>
</module-descriptor>

      

It works!

But I heard that it is possible to change the value of a variable from the admin console, is that correct?

When I view my application in the console (tab Deployment Plan

or tab Configuration

), I don't see a field that I could use to change the variable test

. something or should the values โ€‹โ€‹of the overriding variables be set in the file itself plan.xml

?

+3


source to share


1 answer


I don't think you can directly change the variable, I suppose this is because this is a fundamental change in deployment requiring a "hot update", but you can easily "reallocate / update" with the new plan. This is how you can do it in a production environment:

  • In the Weblogic admin console click on Deployment, check the box next to your ear / war.
  • Click "Update"
  • On the next screen you will ask for the original path and the path of the deployment plan, you can only change the path of the deployment plan to set the new value (s)


You can also call java weblogic.Deployer

with an option update

if you want to do it from the command line .

It is also possible to do the same with WLST scripts - see these Oracle docs

+3


source







All Articles