You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Jürgen Mangler <ju...@univie.ac.at> on 2007/02/23 11:39:54 UTC

Inititalize Resource

Is it somehow possible to initialize the resource immediately after the 
deployment (now it is initialized with the first access to the resource)?

Jürgen

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


RE: Inititalize Resource

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
I'm not sure if that would work.  When the app is being initialized, it can call its servlets to initialize themselves.  But, if one of its servlets tries to call the app itself, and the app is not fully initialized to the point where it can send/receive requests, then the servlet may get an error.  We tried the same thing, too, but failed.  Perhaps this is a limitation of using an Axis2 servlet as the container.  I think you can add servlets to web.xml to do basic initialization stuff, but not to actually initialize the resources.


-----Original Message-----
From: Jürgen Mangler [mailto:juergen.mangler@univie.ac.at] 
Sent: Tuesday, February 27, 2007 6:52 PM
To: muse-user@ws.apache.org
Subject: Re: Inititalize Resource

Hmm, how about adding an additional servlet to the war, with  <load-on-startup>99999</load-on-startup> (loaded for sure after the Resource), that does a fake post to the Resource, something like:

ProxyHandler handler = new ReflectionProxyHandler(); handler.setAction("http://test.org/");
handler.setRequestName(new QName("http://test.org", "startup", "pfx0")); handler.setRequestParameterNames(new QName[0]); handler.setResponseName(null); handler.setReturnType(void.class);
invoke(handler,new Object[0]);

Currently this idea is not working, an Error 500 is returned by axis, but maybe the errorhandler can be overridden to do the initialization.

Jürgen

Daniel Jemiolo wrote:
> Unfortunately, there isn't - discussion is here:
> 
> http://marc.theaimsgroup.com/?l=muse-user&m=116775708010331&w=2
> 
> 
> 
> J rgen Mangler <ju...@univie.ac.at> wrote on 02/23/2007 
> 05:39:54
> AM:
> 
>> Is it somehow possible to initialize the resource immediately after 
>> the deployment (now it is initialized with the first access to the
> resource)?
>> J rgen
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: Inititalize Resource

Posted by Jürgen Mangler <ju...@univie.ac.at>.
Hmm, how about adding an additional servlet to the war,
with  <load-on-startup>99999</load-on-startup> (loaded for sure after 
the Resource), that does a fake post to the Resource, something like:

ProxyHandler handler = new ReflectionProxyHandler();
handler.setAction("http://test.org/");
handler.setRequestName(new QName("http://test.org", "startup", "pfx0"));
handler.setRequestParameterNames(new QName[0]);
handler.setResponseName(null);
handler.setReturnType(void.class);
invoke(handler,new Object[0]);

Currently this idea is not working, an Error 500 is returned by axis, 
but maybe the errorhandler can be overridden to do the initialization.

Jürgen

Daniel Jemiolo wrote:
> Unfortunately, there isn't - discussion is here:
> 
> http://marc.theaimsgroup.com/?l=muse-user&m=116775708010331&w=2
> 
> 
> 
> J�rgen Mangler <ju...@univie.ac.at> wrote on 02/23/2007 05:39:54 
> AM:
> 
>> Is it somehow possible to initialize the resource immediately after the 
>> deployment (now it is initialized with the first access to the 
> resource)?
>> J�rgen
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: muse-user-help@ws.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: Inititalize Resource

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Unfortunately, there isn't - discussion is here:

http://marc.theaimsgroup.com/?l=muse-user&m=116775708010331&w=2



Jürgen Mangler <ju...@univie.ac.at> wrote on 02/23/2007 05:39:54 
AM:

> Is it somehow possible to initialize the resource immediately after the 
> deployment (now it is initialized with the first access to the 
resource)?
> 
> Jürgen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org