• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBOSS AS 5.0 publish issue

 
Ravi Petchimuthu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like an IDE issue. Moving to the IDE forum.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18281
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18281
56
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic