Sterling OMS Hot Deployment Weblogic Server

By | 07/18/2017

Sterling OMS Hot Deployment Weblogic Server

Sterling OMS Hot Deployment Weblogic Server : After our first post (Sterling OMS Writing First Java Program), one of our well-wisher shared about hot deployment. Yes Hot Deployment really useful to developers. In this post we are going to see how to setup hot development and save time.

Sterling OMS Hot Deployment in Weblogic Server

Consider below simple scenario

  • Customer wants to get organization details using given input XML (Can be in any format)
  • Input XML coming into Service looks as shown below

Requirement in Java

  • Create java file

  • Final Result XML to call getOrganizationHierarchy API

Configuration Change Required

  • Create new service with name JavaEnterpriseMapTest and Service group name Custom

JavaEnterpriseMapTest

  • Add extended API (From Component section) as shown below and class and method names

JavaEnterpriseMapTest API Config

  • Add Standard API (From Component section) as shown below

getOrganizationHierarchy API

  • Connect all the points

ALL Connected

  • Click Save

How to build custom code? (Only Once)

  • Go Eclipse Right click on project name SterlingCustom94
  • Select Export
  • Under Java — Select Jar file
  • Select Jar file location <Install Directory>\jar\customjar\1\SterlingCustom94.jar
  • Run Command : deployer.cmd -t resourcejar
  • Run Command : buildear.cmd -Dappserver=weblogic -Dwarfiles=smcfs,sbc -Dearfile=smcfs.ear -Dnowebservice=true -Ddevmode=true -Dnodocear=true -Dwls-10=true create-ear
  • Run Command: del C:\deploy\smcfs.ear (Deleting old ear file)
  • copy <Install Directory>\external_deployments\smcfs.ear C:\deploy

How to perform Hot Deployment?

  • Extract From C:\deploy\smcfs.ear file into C:\deploy\smcfs.ear folder (One time)
  • Extract From C:\deploy\smcfs.ear\smcfs.war file into C:\deploy\smcfs.ear\smcfs.war folder (One time)

Ear Extracted as folder

  • Go Eclipse Right click on project name SterlingCustom94 (Repeat below steps when code change made)
  • Select Export
  • Under Java — Select Jar file
  • Select Jar file location C:\deploy\smcfs.ear\SterlingCustom94.jar
  • Complete jar file creation

Weblogic Deployment

  1. Login to weblogic console http://localhost:7001/console
  2. Deployments link — Using Delete button remove the previous ear (if any)
  3. Click Install button
  4. Select directory C:\deploy and select smcfs.ear folder (Open Directory)
  5. Complete the deployment
  6. Make sure application deployed successfully and present in active status

Run the test?

Input

Input Data JavaEnterpriseMapTest

Output

Result JavaEnterpriseMapTest

Conclusion

Moving forward you can just make code change and build custom jar file using eclipse export option and just stop and start weblogic server or perform redeploy to test changes.

You are ready for testing.

Note: Deploy and redeploy can be done via command line. Let’s see how to perform auto build and deploy using command line in another post.

Happy Learning!!!

Register with us to get more OMS updates

OMS Interview Questions

8 thoughts on “Sterling OMS Hot Deployment Weblogic Server

  1. Yashu Mittal

    Few things I would like to add to this post.

    1. I am not sure why we are using deployer.cmd. To install custom jar, we just need to run install3rdParty.cmd. deployer.cmd will be used if we want to add extensions(table columns or new custom tables) or resources(like templates).

    2.One method is already described here i.e. whenver new code needed to be deployed, user needs to export the jar from eclipse, replace in the smcfs.ear deployed in jboss and restart jboss. There is one more way which is easier than this.

    Just like we extraced the ear, extract the SterlingCustom94.jar into a folder and rename the folder as SterlingCustom94.jar (Folder should have .jar extension)
    Right click on project. Go to Properties/Java build path/ Source tab.
    In the bottom Click on Browse, choose your project top folder, click on Create new folder–>Advanced–>Check link folder to System–>Browse and select the jar folder which you extracted in smcfs.ear. Click on Apply.

    3. Basically what this complete step does is changing the folder where the project classes will be complied. So whatever code changes are done, the latest class files will be generated directly in the jar present in the ear.

    4. Make the changes, restart the server and voila. No jar export, replace in ear required.

    Reply
    1. ActiveKite-Admin Post author

      Hi yashu,

      Thanks lot for comments and contributions. We will update the post with your suggestions. One more time thanks for all your support.

      Regards
      Active kite admin

      Reply
  2. Aman

    Please provide all the step to install on weblogic Please. very nice post.. i have done installation on Jboos.but not able to do on weblogic so pls help..

    Reply
    1. ActiveKite-Admin Post author

      Aman

      We have document how to download and install weblogic and creating domain. Will share with you. Soon will post video version on the same.

      Regards
      Admin

      Reply
  3. Pingback: Sterling OMS Custom Table Creation - Learn IBM Sterling Order Management System

  4. Pingback: Sterling OMS Adding New Column - Learn IBM Sterling Order Management System

Leave a Reply

Your email address will not be published. Required fields are marked *