|
From: Augustyn, R. n. U. <rob...@un...> - 2004-03-05 15:32:38
|
Hi,
I have few problems and before I start asking questions would like to do =
some searching first.
Is there a searchable version of this list available anywhere?
Thanks
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...]On Behalf Of Leif
Mortenson
Sent: Sunday, February 15, 2004 11:12 PM
To: wra...@li...
Subject: Re: [Wrapper-user] Using WrapperStartStopApp with JBoss
Rob,
Starting with Java 1.3, a feature called shutdown hooks were added=20
to Java. A
method was added to the java.lang.Runtime class which allows you to=20
register a
Thread which will be started when the JVM starts to shutdown. This can =
be
triggered by either hitting CTRL-C or by calling System.exit someplace=20
in the
code.
In the case of the Wrapper, a request by the Wrapper to shutdown the
JVM results in System.exit being called from within the JVM. This=20
results in all
registered shutdown hooks being executed before the JVM actually shuts =
down.
JBoss registers such a shutdown hook to handle the case where the user=20
presses
CTRL-C. This makes it very easy to integrate with the Wrapper.
Tomcat on the other hand does not register any shutdown hooks and=20
will this
shutdown hard if you hit CTRL-C in the console. In order to shut it=20
down cleanly
another class must be executed. That is why its integration makes use=20
of the
WrapperStartStopApp helper class.
As a note, if you want your application to exit the JVM without=20
executing any
shutdown hooks you can do so by calling Runtime.getRuntime.halt()
Cheers,
Leif
Rob Moore wrote:
> Hi, Leif,
>
> Thanks for your response. The WrapperSimpleApp is working fine, but I=20
> just had the understanding that I needed to notify JBoss to shut=20
> itself down properly. From what you are saying, this is the case by=20
> default. I'm just curious how this is communicated to JBoss -- is it=20
> equivalent to hitting control-c in the console window?
>
> Rob
>
> Leif Mortenson wrote:
>
>> Rob,
>>
>> I have never tried that integration method with JBoss. Is there a
>> reason why the
>>
>> WrapperSimpleApp method is not working for you? JBoss shuts down=20
>> normally
>>
>> using its own shutdown hook so you shouldn't have to be calling a =
stop
>> method.
>>
>>
>>
>> When using the WrapperStartStopApp, both the start and stop =
classes
>> are loaded
>>
>> using the same class path. This will only work for applications =
which
>> allow that.
>>
>>
>>
>> Also what are the errors you are seeing so I can help you without
>> trying to
>>
>> reproduce your configuration in the dark.
>>
>>
>>
>> Cheers,
>>
>> Leif
>>
>>
>>
>> Rob Moore wrote:
>>
>>
>>
>>> Has anybody been able to get WrapperStartStopApp to work =
successfully
>>
>>
>>
>>> with JBoss?
>>
>>
>>
>>>
>>
>>> I would like to use the WrapperStartStopApp with JBoss, but I get
>>
>>
>>
>>> errors when I attempt to do so (I don't see the errors using
>>
>>
>>
>>> WrapperSimpleApp) that appear to be related to the classpath. It =
looks
>>
>>
>>
>>> like the problem results from the fact that I have to include all of
>>
>>
>>
>>> the jars needed for startup and shutdown. So I was curious if there =
is
>>
>>
>>
>>> a way to specify some jars in the classpath to be used for start and
>>
>>
>>
>>> others to be used for stop.=20
>>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|