• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JBOSS AS 5.0 publish issue

 
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
 
Sheriff
Posts: 10445
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.
 
author
Posts: 5856
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.
 
Saloon Keeper
Posts: 22265
151
Android Eclipse IDE Tomcat Server Redhat Java 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
Sheriff
Posts: 10445
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
Posts: 22265
151
Android Eclipse IDE Tomcat Server Redhat Java 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
Sheriff
Posts: 10445
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.
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic