This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes JBOSS AS 5.0 publish issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JBOSS AS 5.0 publish issue" Watch "JBOSS AS 5.0 publish issue" New topic
Author

JBOSS AS 5.0 publish issue

Ravi Petchimuthu
Greenhorn

Joined: May 31, 2007
Posts: 17
Hi,

Facing a problem in JBOSS, whenever the code change happens in our application.
I have enabled "Automatic Publishing when resource changed" property in JBOSS. The publish happens properly whenever am making the code change, but after the publish the current session is been destroyed and the application disconnects. Had to restart the server for every changes.

Guys, appreciate your help on this.

Thanks,
Ravi.P
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10441
    
176

Looks like an IDE issue. Moving to the IDE forum.

[My Blog] [JavaRanch Journal]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5852
    
    7

That sounds like logical operation to me. If you change anything other than a jsp or css file, then the application will be redeployed when it is republished. And when the app is redeployed, any existing sessions are terminated. You might want to turn of automatic publishing and only publish when you are ready.

What do you mean by "application disconnects"? What kind of application is this? Some description of how this application interacts with JBoss AS would help.


JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17046
    
  26

Actually, the default on Tomcat is that sessions do survive a redeploy and even a shutdown/restart (they're persisted to Tomcat's work directory). Assuming that JBoss isn't overriding that feature.

However, redeployment isn't instantaneous. So there is a noticeable period where the web application is not available while it restarts - you can see this happening in the console log. This outage can be compounded if you trigger the infamous "PermGen Space" problem, which WILL require a total server restart.

Caveat: persisted sessions can be more trouble than they're worth, since any non-persistable objects in the session will be lost. Restoring a session does not call the session object constructors.


An IDE is no substitute for an Intelligent Developer.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10441
    
176

Tim Holloway wrote:Actually, the default on Tomcat is that sessions do survive a redeploy and even a shutdown/restart (they're persisted to Tomcat's work directory). Assuming that JBoss isn't overriding that feature.

By default, it's disabled in JBoss http://community.jboss.org/message/607681#607681

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17046
    
  26

Well, there you go then!

Actually, I think they're being a tad sloppy in what they said, though. I doubt that option REALLY deletes the Tomcat work directory. It's more likely to be deleting the subdirectory UNDER the tomcat work directory that corresponds to the webapp being redeployed. Deleting the entire work directory, including all the work directories of other deployed apps would be just a bit rude.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10441
    
176

Tim Holloway wrote:It's more likely to be deleting the subdirectory UNDER the tomcat work directory that corresponds to the webapp being redeployed. Deleting the entire work directory, including all the work directories of other deployed apps would be just a bit rude.


Good point! Yeah, it just deletes the subdirectory belonging to the app being undeployed.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JBOSS AS 5.0 publish issue
 
It's not a secret anymore!