You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Davanum Srinivas <di...@yahoo.com> on 2003/05/04 16:52:57 UTC

Re: FileProvider and Lifecycle methods on AxisServer

Dan,

AFAIK, You don't need to call AxisServer.start(). start/stop in AxisServer are probably a
relic....

Thanks,
dims

--- Dan Diephouse <da...@envoisolutions.com> wrote:
> If you create a FileProvider from an InputStream and use it to configure 
> your AxisServer, it poses a problem.  The constructor on the AxisServer 
> calls AxisEngine.init().  When init is called, it configures the 
> AxisEngine by calling FileProvider.configureEngine( AxisEngine engine ). 
>   However, there is a line in FileProvider that sets the configuration 
> InputStream equal to null once the engine is configured.  Which means, 
> if you call AxisEngine.start() you're in for trouble, because it calls 
> init() again, configuring the server once again.  However, there is no 
> longer a configuration, it is null now.
> 
> So this raised the question, do I need to call start()? Obviously not, 
> because my server is already started.   The constructor should probably 
> have a javadoc that states that AxisServer is already start()'d when you 
> instantiate the server.
> 
> Should FileProvider be setting the InputStream for the configuration to 
> null?  What happens if someone wants to restart the server?
> 
> However, before I go making javadoc patches, it would be nice to have 
> some clarification of the AxisEngine lifecycle. Does start() really only 
> mean restart()? I don't see a case where you would need to call start() 
> unless you're restarting the AxisServer.  Or, why does start() call 
> init()?  Shouldn't the server already be initialized after you're 
> starting it?  Should start() check to see if the server is running 
> before init()'ing again?
> 
> Thanks,
> 
> - Dan
> 
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Re: FileProvider and Lifecycle methods on AxisServer

Posted by Dan Diephouse <da...@envoisolutions.com>.
OK, thanks.. I'll put together some doco in a patch so thats clear from 
now on.

- Dan

Davanum Srinivas wrote:
> Dan,
> 
> AFAIK, You don't need to call AxisServer.start(). start/stop in AxisServer are probably a
> relic....
> 
> Thanks,
> dims
> 
> --- Dan Diephouse <da...@envoisolutions.com> wrote:
> 
>>If you create a FileProvider from an InputStream and use it to configure 
>>your AxisServer, it poses a problem.  The constructor on the AxisServer 
>>calls AxisEngine.init().  When init is called, it configures the 
>>AxisEngine by calling FileProvider.configureEngine( AxisEngine engine ). 
>>  However, there is a line in FileProvider that sets the configuration 
>>InputStream equal to null once the engine is configured.  Which means, 
>>if you call AxisEngine.start() you're in for trouble, because it calls 
>>init() again, configuring the server once again.  However, there is no 
>>longer a configuration, it is null now.
>>
>>So this raised the question, do I need to call start()? Obviously not, 
>>because my server is already started.   The constructor should probably 
>>have a javadoc that states that AxisServer is already start()'d when you 
>>instantiate the server.
>>
>>Should FileProvider be setting the InputStream for the configuration to 
>>null?  What happens if someone wants to restart the server?
>>
>>However, before I go making javadoc patches, it would be nice to have 
>>some clarification of the AxisEngine lifecycle. Does start() really only 
>>mean restart()? I don't see a case where you would need to call start() 
>>unless you're restarting the AxisServer.  Or, why does start() call 
>>init()?  Shouldn't the server already be initialized after you're 
>>starting it?  Should start() check to see if the server is running 
>>before init()'ing again?
>>
>>Thanks,
>>
>>- Dan
>>
>>
> 
> 
> 
> =====
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>