|
From: Hubert F. <hub...@ab...> - 2007-02-06 09:01:35
|
Well, the doc says about the stop() function. <The Wrapper assumes that this method will return fairly quickly So it's probably a bad idea to do a join() in the stop function to wait for other threads to shutdown, because this cannot be "quickly". And it looks like this confuses the regular wrapper shutdown procedure. I can live with that. I will add a comment on the description of "integration method 3" hub >>> "Hubert Felber" <hub...@ab...> 05.02.2007 12:07 >>> Leif, The problem seams to be originated from privilegedStopInner() in WrapperManager.java where only a part of the function is synchronized. The first thread calls it from handleSocket() reaches line 3176 in privilegedStopInner(), calls my stop method, where I do a join. A second thread which is the Wrapper Shutdown Hook enters privilegedStopInner(), and, because first thread already left the synchronized section, produces this side effect. Regards hub >>> "Hubert Felber" <hub...@ab...> 05.02.2007 11:14 >>> Leif, I think I have isolated the code that causes this behaviour: In my stop function, called by Wrapper, I flag the application thread to shutdown and do a join() on that thread to await it's death. Removing this join() makes the behaviour "normal", the log looks fine then. Is this something one should avoid to do? Regards hub >>> "Hubert Felber" <hub...@ab...> 04.02.2007 12:00 >>> Leif, Yes, this happened in console mode after hitting Ctrl-c, but also when running as service (allow to interact with console, display a console). I started and stopped the service with Windows Service Manager and got the same errors. <What is happening in that stop method? Nothing more then telling a thread to exit and wait for that with a join(). <Could you post your WrapperListener implementation? I appended the skeleton and the conf file. Thank you very much for taking a look. btw I noticed something else: Calling WrapperManager.signalStopping(1000); I expected that the value is added to the TimeToWait defined in the conf file. But it seams that it is not added but replaced. This is the new time to wait. And if you call it on Windows with value 1000, it causes a quite immediate exit. Regards Hubert >>> Leif Mortenson <le...@ta...> 02.02.2007 19:45 >>> Hubert, You have gotten into an unexpected state. It looks like you are running in console mode and have invoked the shutdown using CTRL-C. That is triggering the wrapper shutdown process. Your WrapperListener.stop method is being started and completing normally. The problem happens after that. What is happening in that stop method? Is it triggering another thread that may be calling System.exit? The shutdown thread expects to be able to unregister the shutdown hook, but another thread has already initiated the shutdown of the JVM. Could you post your WrapperListener implementation? I am going to need to see it to understand exactly what is going on here. Cheers, Leif Hubert Felber wrote: > Hi, > > I made a skeleton of integration method 3 to play with wrapper. > Shutdown the service gives me curious errors. Could anybody please > take a look at the attached log file and tell me, what's going wrong? > > I get a "Unable to unregister shutdown hook: > java.lang.IllegalStateException: Shutdown in progress > I didn't register one, so it must be one of used by wrapper. > > And a "System.exit appears to have been called from within the > WrapperListener.stop() method", > which I would never do, of course. My stop method is called and I > return 0. > > I'm using the latest trunk wrapper 3.2.4-a, my app ist just a > skeleton wich doesn't do anything but starting a thread which prints > dots on stdout, and is closed properly. There is no difference running > it as console app or as service. > The application exits, but I would like to know what these errors are > and how to avoid them. > > Can anybody help please? > > Thank you > Hubert ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |