aspose file tools*
The moose likes BEA/Weblogic and the fly likes Hot-deploying/replacing classes in WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Hot-deploying/replacing classes in WEB-INF" Watch "Hot-deploying/replacing classes in WEB-INF" New topic
Author

Hot-deploying/replacing classes in WEB-INF

Joseph Hare
Greenhorn

Joined: Feb 11, 2010
Posts: 4
I'm starting to experiment with in-container unit testing (Cactus), and the Ant task I am using copies various .class files to the WEB-INF/classes folder. Typically for our product production mode is enabled, which I understand is an obstacle to this hot-replacement. I've been able to get Weblogic to start out of production mode (-Dweblogic.ProductionModeEnabled=false), but when I replace the server-side class files it seems to be executing the old still.

What other settings or configurations should I check?

I'll have to admit I'm fairly green on the whole application deployment structure and application server setup. I came into this job not doing any Java and have been going from small picture to big picture. If there's a good explanation that goes beyond simply stating "There are exploded deployments, and unexploded deployments. See you later." I'd be very keen on reading that before I waste anyone's time.

Thanks!
- Joe
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Welcome to javaranch

Please tell us if your are packaging the application as a WAR or, as you suggested, exploding it.

If you are exploding it the changes should be picked up. If you are packaging it there are still automated ways through which the application can be redeployed - using ant tasks.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Joseph Hare
Greenhorn

Joined: Feb 11, 2010
Posts: 4
I think we have an exploded setup. The application's structure seems to be directory based, but all of our EJBs are in JAR files, not in a /my/package/folder/*.class file structure.The directory structure is like this:

OurApp.ear\[All of our main EJB .jar files, this is a folder, not a an actual .ear file. This may be a source of some of my confusion.]
OurApp.ear\APP-INF\[classes],[lib] folders with the libraries we all use in the app. The \classes part is not hot-replaceable.
OurApp.ear\OurApp.war[also a folder]\common\[All of our JSPs etc]
OurApp.ear\OurApp.war\WEB-INF\classes\[folder holding all of my cactus unit tests].

Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Yes it does look like you have an exploded setup. When you make changes to the java files, your IDE is responsible for picking up those changes, making a compilation and publishing the changes to the server.

Which IDE are you using and are you starting the server from the IDE ? The IDE (I use eclipse) should say something like ''publishing" on its server tab when you make the changes.
Joseph Hare
Greenhorn

Joined: Feb 11, 2010
Posts: 4
I'm using Eclipse Galileo. I don't start the server from the IDE, we typically have had a batch file that fires it up. Does starting it from Eclipse hook the local JDK I'm using to the running server's? We typically configure the server itself to run on the jrockit JVM. Are there Weblogic integration plugins that would be helpful here?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Yes you need an integration plugin. Oracle provides them at the moment. Unless you start the server from the IDE, the IDE cannot perform the hot deploy.

Use this link to try the plugins. Its for WL 10.3

http://www.oracle.com/technology/software/products/ias/bea_main.html#devtools
Joseph Hare
Greenhorn

Joined: Feb 11, 2010
Posts: 4
I'll hit that up in the morning. It's approaching my bed time. Thanks so much for your help!
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

No problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hot-deploying/replacing classes in WEB-INF