Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2091
  • Last Modified:

Deploying, ReDeploying JAR file to WebLogic without restarting the server!

We have an application which has requirement of deploying the part of application business logic at Run time.

We have an interface where we can browse the JAR file and deploy it to the underlying WebLogic server. We are able to deploy the JAR file at run time and invoke the class within that JAR.

We are facing the problem when that class logic is modified and it needs to be deployed again. We were not able to deploy the changes at run time without restarting the WebLogic. WebLogic is taking the same old version of the class and invoking it.

Is there any way to ask WebLogic to load class again in memory from underlying JAR file.
0
techprocess
Asked:
techprocess
  • 5
  • 5
1 Solution
 
rajesh_balaCommented:
You can try checking some of the admin MBeans. Which weblogic version is it. 9.x/10.x/8.x??
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
techprocessAuthor Commented:
We are using WebLogic 9 in Development & UAT environment, WebLogic 10 in production environment.
0
 
techprocessAuthor Commented:
The class we are deploying is simple JAVA class included in the JAR file. The links suggested talks about EAR and EJBs, can it be possible to redeploy standard JAVA class without restarting WebLogic?? We tried to use "weblogic.deploy" command line utility but unable to redeploy the classes. It still takes the old deployed version of the class.
0
 
rajesh_balaCommented:
It would not taken into effect until some request referencing the old class is completed. So you might want to check if all other requests are completed while testing.
0
 
techprocessAuthor Commented:
Considering that all the requests referencing the old class are completed, how can we achieve reloading the class. Is there any way out by destroying the class loader for that particular class??
0
 
techprocessAuthor Commented:
We got the solution!! We have used "URLClassLoader" class from "java.lang" package to reload the jar with new class loader instance which served our purpose.
0
 
techprocessAuthor Commented:
Successful R&D
0
 
rajesh_balaCommented:
Thankx for posting the solution
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now