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:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 6:52 PM
To: [email protected]
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to