You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Andy <an...@orprovision.com> on 2010/05/27 15:31:14 UTC

AdminDaemon not stopping standalone server.

AdminDaemon.java:

This call returns a 'null' object as a/the Server.class instance is 
never registered with the SystemInstance.
Server server = SystemInstance.get().getComponent(Server.class);

The resulting NullPointerException is not logged, and the server is not 
shutdown.

The question is, where should this be registered?

Regards,

Andy.

Re: AdminDaemon not stopping standalone server.

Posted by David Blevins <da...@visi.com>.
Hi Andy,

Hope your vacation was good :)

On May 28, 2010, at 1:01 AM, Andy wrote:

> A 'temp' directory issue patch is here https://issues.apache.org/jira/browse/OPENEJB-1285
> The patch code (v2) has been tested over this week and has definitely resolved the issue - only the contents of 'temp' are removed and not the directory itself.

Good catch!  Got this one in and the jira marked closed assigned to you.

> Also added my latest patch for ActiveMQ - https://issues.apache.org/jira/browse/OPENEJB-1267

Ditto for this one.

Thank you so much for the patches!  I always love the production related fixes/enhancements.  Doesn't really get any better than that :)


-David


Re: AdminDaemon not stopping standalone server.

Posted by Andy <an...@orprovision.com>.
On 27.05.2010 18:54, David Blevins wrote:
> On May 27, 2010, at 7:28 AM, Andy wrote:
>
>    
>> On 27.05.2010 15:43, Andy wrote:
>>      
>>> On 27.05.2010 15:31, Andy wrote:
>>>        
>>>> AdminDaemon.java:
>>>>
>>>> This call returns a 'null' object as a/the Server.class instance is never registered with the SystemInstance.
>>>> Server server = SystemInstance.get().getComponent(Server.class);
>>>>
>>>> The resulting NullPointerException is not logged, and the server is not shutdown.
>>>>
>>>> The question is, where should this be registered?
>>>>
>>>> Regards,
>>>>
>>>> Andy.
>>>>
>>>>
>>>>          
>>> In Main.initServer() or within the Server.init() method - i.e It registers itself upon a call to init?
>>>
>>>
>>>        
>> In addition to this the Server.stop() call should call manager.stop(); 'after' OpenEJB.destroy(); as this initiates a vm shutdown.
>>
>> public void stop() throws Exception {
>>         OpenEJB.destroy();
>>         manager.stop(); //Initiates a vm shutdown....
>>     }
>>      
> Great.  Attach a patch to OPENEJB-1249 and I'll get it in!
>
> On a very related note, we've got this ant script that we've been using at release time to download zips, start the standalone server, deploys and runs the itests app then shuts it down again.
>
>    http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/test/build.xml
>
> It would be wonderful to have some version of it that is hooked into the build and run as part of the openejb-standalone package, so then we'd be running it as developers regularly and it would always be going in the CI system.
>
> Any interest in hacking on something along those lines?
>
> -David
>
>
>
>    
Sure David, I've put a patch up for this 'stop' issue - I've put the 
system registration in the 'Main.initServer()'. 
https://issues.apache.org/jira/browse/OPENEJB-1249

I'll also get working on a build.xml style test case in 'OpenEJB :: 
Assembly :: Standalone'

A 'temp' directory issue patch is here 
https://issues.apache.org/jira/browse/OPENEJB-1285
The patch code (v2) has been tested over this week and has definitely 
resolved the issue - only the contents of 'temp' are removed and not the 
directory itself.

Also added my latest patch for ActiveMQ - 
https://issues.apache.org/jira/browse/OPENEJB-1267

Andy.

Re: AdminDaemon not stopping standalone server.

Posted by David Blevins <da...@visi.com>.
On Jun 4, 2010, at 1:33 AM, Andy wrote:

> On 27.05.2010 18:54, David Blevins wrote:
>> On a very related note, we've got this ant script that we've been using at release time to download zips, start the standalone server, deploys and runs the itests app then shuts it down again.
>> 
>>   http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/test/build.xml
>> 
>> It would be wonderful to have some version of it that is hooked into the build and run as part of the openejb-standalone package, so then we'd be running it as developers regularly and it would always be going in the CI system.
>>   
> I wanted to get this done before I swanned off into the sun, but time was cut short. Just to let you know I'll be off the radar for two weeks, and will continue on it when I get back!

No worries.  Hope you're on vacation! :)

-David


Testing Tomcat integration in build (was Re: AdminDaemon not stopping standalone server.)

Posted by David Blevins <da...@visi.com>.
On Jun 4, 2010, at 1:33 AM, Andy wrote:

> On 27.05.2010 18:54, David Blevins wrote:
>> On a very related note, we've got this ant script that we've been using at release time to download zips, start the standalone server, deploys and runs the itests app then shuts it down again.
>> 
>>   http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/test/build.xml
>> 
>> It would be wonderful to have some version of it that is hooked into the build and run as part of the openejb-standalone package, so then we'd be running it as developers regularly and it would always be going in the CI system.
>> 
>> Any interest in hacking on something along those lines?
>> 
> I wanted to get this done before I swanned off into the sun, but time was cut short. Just to let you know I'll be off the radar for two weeks, and will continue on it when I get back!

Hi Andy!

Not sure if you've had a chance to look at this -- no worries if not, work work comes first :)

A user just posted about the tomcat:run plugin for maven and I dug up this JIRA:
  
  http://jira.codehaus.org/browse/MTOMCAT-10

I wonder if this is something we could be using?  Might make that ant script irrelevant.


-David


Re: AdminDaemon not stopping standalone server.

Posted by Andy <an...@orprovision.com>.
On 27.05.2010 18:54, David Blevins wrote:
> On May 27, 2010, at 7:28 AM, Andy wrote:
>
>    
>> On 27.05.2010 15:43, Andy wrote:
>>      
>>> On 27.05.2010 15:31, Andy wrote:
>>>        
>>>> AdminDaemon.java:
>>>>
>>>> This call returns a 'null' object as a/the Server.class instance is never registered with the SystemInstance.
>>>> Server server = SystemInstance.get().getComponent(Server.class);
>>>>
>>>> The resulting NullPointerException is not logged, and the server is not shutdown.
>>>>
>>>> The question is, where should this be registered?
>>>>
>>>> Regards,
>>>>
>>>> Andy.
>>>>
>>>>
>>>>          
>>> In Main.initServer() or within the Server.init() method - i.e It registers itself upon a call to init?
>>>
>>>
>>>        
>> In addition to this the Server.stop() call should call manager.stop(); 'after' OpenEJB.destroy(); as this initiates a vm shutdown.
>>
>> public void stop() throws Exception {
>>         OpenEJB.destroy();
>>         manager.stop(); //Initiates a vm shutdown....
>>     }
>>      
> Great.  Attach a patch to OPENEJB-1249 and I'll get it in!
>
> On a very related note, we've got this ant script that we've been using at release time to download zips, start the standalone server, deploys and runs the itests app then shuts it down again.
>
>    http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/test/build.xml
>
> It would be wonderful to have some version of it that is hooked into the build and run as part of the openejb-standalone package, so then we'd be running it as developers regularly and it would always be going in the CI system.
>
> Any interest in hacking on something along those lines?
>
> -David
>
>
>
>    
I wanted to get this done before I swanned off into the sun, but time 
was cut short. Just to let you know I'll be off the radar for two weeks, 
and will continue on it when I get back!

Andy.

Re: AdminDaemon not stopping standalone server.

Posted by David Blevins <da...@visi.com>.
On May 27, 2010, at 7:28 AM, Andy wrote:

> On 27.05.2010 15:43, Andy wrote:
>> On 27.05.2010 15:31, Andy wrote:
>>> AdminDaemon.java:
>>> 
>>> This call returns a 'null' object as a/the Server.class instance is never registered with the SystemInstance.
>>> Server server = SystemInstance.get().getComponent(Server.class);
>>> 
>>> The resulting NullPointerException is not logged, and the server is not shutdown.
>>> 
>>> The question is, where should this be registered?
>>> 
>>> Regards,
>>> 
>>> Andy.
>>> 
>>> 
>> 
>> In Main.initServer() or within the Server.init() method - i.e It registers itself upon a call to init?
>> 
>> 
> In addition to this the Server.stop() call should call manager.stop(); 'after' OpenEJB.destroy(); as this initiates a vm shutdown.
> 
> public void stop() throws Exception {
>        OpenEJB.destroy();
>        manager.stop(); //Initiates a vm shutdown....
>    }

Great.  Attach a patch to OPENEJB-1249 and I'll get it in!

On a very related note, we've got this ant script that we've been using at release time to download zips, start the standalone server, deploys and runs the itests app then shuts it down again.

  http://svn.apache.org/repos/asf/openejb/trunk/openejb3/assembly/test/build.xml

It would be wonderful to have some version of it that is hooked into the build and run as part of the openejb-standalone package, so then we'd be running it as developers regularly and it would always be going in the CI system.

Any interest in hacking on something along those lines?

-David


Re: AdminDaemon not stopping standalone server.

Posted by Andy <an...@orprovision.com>.
On 27.05.2010 15:43, Andy wrote:
> On 27.05.2010 15:31, Andy wrote:
>> AdminDaemon.java:
>>
>> This call returns a 'null' object as a/the Server.class instance is 
>> never registered with the SystemInstance.
>> Server server = SystemInstance.get().getComponent(Server.class);
>>
>> The resulting NullPointerException is not logged, and the server is 
>> not shutdown.
>>
>> The question is, where should this be registered?
>>
>> Regards,
>>
>> Andy.
>>
>>
>
> In Main.initServer() or within the Server.init() method - i.e It 
> registers itself upon a call to init?
>
>
In addition to this the Server.stop() call should call manager.stop(); 
'after' OpenEJB.destroy(); as this initiates a vm shutdown.

public void stop() throws Exception {
         OpenEJB.destroy();
         manager.stop(); //Initiates a vm shutdown....
     }

Re: AdminDaemon not stopping standalone server.

Posted by Andy <an...@orprovision.com>.
On 27.05.2010 15:31, Andy wrote:
> AdminDaemon.java:
>
> This call returns a 'null' object as a/the Server.class instance is 
> never registered with the SystemInstance.
> Server server = SystemInstance.get().getComponent(Server.class);
>
> The resulting NullPointerException is not logged, and the server is 
> not shutdown.
>
> The question is, where should this be registered?
>
> Regards,
>
> Andy.
>
>

In Main.initServer() or within the Server.init() method - i.e It 
registers itself upon a call to init?