facebook

Stopping JRUN4 no longer calls servlet destroy methods ??

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #249506 Reply

    Danny Azou
    Member

    Just upgraded to latest myeclipse version and when I shut down the JRUN4 appserver it immediately responds in the console saying
    “***This server has been successfully shutdown***”

    But I notice that none of the Destroy methods in the loaded servlets are called anymore.

    It definetely used to do this in the older version, we saw all the console output from these methods and they properly executed, shutting down connections etc…

    Anybody any idea as to what can be done about this.
    I have tried to muck around a bit with the ‘additional shutdown parameters’ but no luck.

    Thanks in advance

    #249541

    Riyad Kalla
    Member

    If you wait a while does it shut it down cleanly or just murder the process? I know we added a safety loop if the process doesn’t shut down in time, it is killed.

    Does this actually screw up your app?

    #249696

    Danny Azou
    Member

    Hello,
    Hmmm, the stop seems to happen immediately, ie it almost immediately comes back saying *** this server has been shut down successfully ***, so I do not notice anything of this safety loop happening (waiting) at all.
    The debug console listing the processing immediately says:
    – <terminated> jrunx.kernel.Jrun at localhost
    – <terminated exit value:1> c:/sun/java14sdk/jdk/javaw.exe

    I suppose exit value 1 means killed ???
    And yes it screws up our app (while programming at least) since it leaves stuff in the database at startup and is supposed to remove that at shutdown – otherwise the db don’t let it start again the next time. So now, we have to manually remove that db-stuff in order to be bale to relaunch again.

    Is that Safety Loop duration controlled by a parameter/config or so? Maybe the thing don’t wait at all and just gives the app no time to invoke the destroy methods on the servlets ???

    Appreciate your help!

    #249750

    Scott Anderson
    Participant

    Danny,

    The server connector in the latest release actually terminates the debug process as this ensures that the process is terminated and avoids issues with servers that are told to shutdown and then do not. In fact, we had several problems with jRun and a few other servers doing exactly that, thus preventing relaunch. So, I can see that triggering your cleanup logic for development in this case could be messed up if you’re using shutdown hooks. Of course, this would also happen for a server crash or other unforseen occurance. In the short term, the only workaround I see is externalizing the “cleanup” routine and either manually calling it prior to shutdown or running it externally (like a JUnit test that cleans up). Sorry that that’s not a fix, but more of a “make it work”.

    #249756

    Danny Azou
    Member

    Ok scott,

    I see your point. (Funny we never had any shutdown-relaunch issues with Jrun though – but that’s probably not the same for everybody on the planet).

    Ok, we’ll sure find some way of externalising that cleanup while developing.

    I appreciated your help and keep up the good work!

    Danny

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Stopping JRUN4 no longer calls servlet destroy methods ??

You must be logged in to post in the forum log in