This discussion is archived
3 Replies Latest reply: Apr 12, 2013 5:57 AM by 997468 RSS

Modify Deployment Order

Anton_ Newbie
Currently Being Moderated
Hello all,

I have 2 deployments, deployment 2 needs to be deployed after deployment 1 because it d2 is using d1. As far as I know you have so called "Deployment Order" (DO). d1 hast DO=100 and d2 has DO=200. If so, then eg after a restart of the weblogic d1 is deployed before d2.

Now my question: How to modify DO during the building of d2? That means that I want to have the information DO=200 in web.xml (or whatever) of the d2. I've tried <load-on-startup>2</load-on-startup> but it doesn't work because I think it is only valid for 2 different servlets in the sam .ear. But I have 2 .ears. Maybe edit weblogic.xml somehow. But I think weblogic.xml affects all deployments and not only 1.

Thank you in advance for you feedback.

Kind regards,
Anton
  • 1. Re: Modify Deployment Order
    RenévanWijk Oracle ACE
    Currently Being Moderated
    To my knowledge to change the deployment order, the application must first be deployed, for example by using the WLST deploy command (http://docs.oracle.com/cd/E24329_01/web.1211/e24490/reference.htm#i1024284) after which you can obtain an instance of the AppDeploymentMBean (http://docs.oracle.com/cd/E12839_01/apirefs.1111/e13951/core/index.html) and change the DeploymentOrder attribute (http://docs.oracle.com/cd/E24329_01/web.1211/e24443/managing.htm#DEPGD306).

    The following shows an example (with shared libraries)
    print 'DEPLOY LIBRARIES';
    deploy('jsf-ri', path=jsfrilibrary, targets='Cluster', libraryModule='true');
    deploy('trinidad', path=trinidadlibrary, targets='Cluster', libraryModule='true');
    deploy('coherence-web-spi', path=coherencelibrary, targets='Cluster', libraryModule='true');
    
    print 'START EDIT MODE';
    edit();
    startEdit();
    
    print 'CHANGE DEPLOYMENT ORDER OF DEPLOYED LIBRARIES';
    libraries = cmo.getLibraries();
    for library in libraries:
         library.setDeploymentOrder(1);
    
    print 'SAVE AND ACTIVATE CHANGES';
    save();
    activate(block='true');
  • 2. Re: Modify Deployment Order
    Anton_ Newbie
    Currently Being Moderated
    Thank you for your answer.

    First I need to familiarize myself with WLS scripting. Then I'll give it a try.

    Don't know if it is a correct answer but it is helpful one ;-)

    Kind regards,
    Anton
  • 3. Re: Modify Deployment Order
    997468 Explorer
    Currently Being Moderated
    Hi,

    Deployment order can also be changed from admin console for a deployed application. Follow below steps,

    1. Lock & Edit
    2. Go to domain > deployments > <app>
    3. Go to Overview tab of the selected deployment where you will see the deployment order as 100 set as default.
    4. Give a value as required.
    5. Save and Activate change.

    Thanks,
    Ranjan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points