This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Dynamic re-loading of class files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Dynamic re-loading of class files" Watch "Dynamic re-loading of class files" New topic

Dynamic re-loading of class files

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485

I would liked to know is it possible to achieve dynamic reloading of class files without re-starting the server.

I believe hot deployment is the ability to deploy the application (new or existing) while the server is running. But i
would liked to load the changes to the class files without restarting the server.

We use a whole lot of EJB's in our application, which makes the restarting process around 8 min.

So i would liked to know is it possible to load the class files dynamically without re-starting the server.

Peter Johnson

Joined: May 14, 2008
Posts: 5852

How are your classes packaged and deployed? With an EAR file? Or within an exploded EAR directory? If you have an EAR file, replacing it with an updated version will redeploy it. If you have an exploded directory, 'touch' the META-INF/application.xml file - this will cause the app to be redeployed.

JBoss In Action
Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
We use Ant to move the files to the deploy directory and use touch task to re-start the server, to pick the new files.

But i would liked to know is there anyway we can make the app to pick the new class file without re-starting (through touch task) the application.

The main purpose of why i am looking forward is, restarting the app takes 8 mins.
Since we have lot of EJB's it takes some time to undeploy and re-deploy the EJB's.
And also EJB's are not changed frequently. But we work at the web layer (servlet or Action class). So i would want to know is there any way we can load the latest class file without re-starting the server.
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10440

A related topic

[My Blog] [JavaRanch Journal]
Have you checked out Aspose?
subject: Dynamic re-loading of class files
It's not a secret anymore!