You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by EP...@upstate.com on 2003/06/06 10:55:54 UTC

How Can I figure out if Turbine has been inited..

Hi all,

I am tweaking the TurbineTest2 testcase..  I need to call the
Turbine.destroy() method if I run all the cactus tests.  But if I run just
the single TurbineTest2, then calling .destroy() through an NPE.  

I noticed no method like Turbine.isInited() or something that that I could
query...

Any suggestions?  Make the member variable firstInit exposed?

Eric Pugh

Re: How Can I figure out if Turbine has been inited..

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
EPugh@upstate.com writes:

>------_=_NextPart_001_01C32C09.706F0E40
>Content-Type: text/plain;
>	charset="iso-8859-1"

>Hi all,

>I am tweaking the TurbineTest2 testcase..  I need to call the
>Turbine.destroy() method if I run all the cactus tests.  But if I run just
>the single TurbineTest2, then calling .destroy() through an NPE.  

>I noticed no method like Turbine.isInited() or something that that I could
>query...

>Any suggestions?  Make the member variable firstInit exposed?

The NPE is a bug. About exposing the firstInit variable: I'm still a
little unhappy about the way Turbine is inited. It simply isn't
reliable because, even if you start up your container; if noone is
accessing the application, it is not really started. So by exposing
the firstInit method, you don't really get any information whether the
startup failed or simply hasn't happened yet.

I put a wrapper around serviceManager which isn't inited and causes
the NPE. So you should be able to call destroy unconditionally on the
Turbine servlet. Please try.

	Regards
		Henning
-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org