Alessio Soldano [
http://community.jboss.org/people/asoldano] created the discussion
"Re: Load on startup is ignored - JaxWS webservice is always initialized first"
To view the discussion, visit:
http://community.jboss.org/message/617931#617931
--------------------------------------------------------------
rushead wrote:
Thank you very much.
Now I understand the behavior, and the differences between 5.1 and 7 :)
No
problem :-)
I'm using the @PostConstruct annotation now, which works fine for
me.
My only problem now is (in my special case), that I think the webservice should be
destroyed if the configuration can not be loaded in the @PostConstruct method.
Is there any way to invoke that the webservice should be distroyed (within the
@PostConstruct method)?
mmh... not really. Basically, you're deploying a war
unit, so the lifecycle of the stuff in there is controlled by that unit being deployed and
undeployed. You might throw an exception in the @PostConstruct annotated method, but I
guess that would cause the whole unit deployment to fail (not sure though, this should be
verified).
That might come with some additional complexity, but this requirement would suggest trying
the Endpoint publish API approach; it seems you really need to programmatically control
the ws endpoint lifecycle.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/617931#617931]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]