[jboss-user] [JBoss Web Services Development] New message: "Re: Parallel invocations of JaxWS services and getPort"

Richard Opalka do-not-reply at jboss.com
Mon Feb 15 06:11:37 EST 2010

User development,

A new message was posted in the thread "Parallel invocations of JaxWS services and getPort":


Author  : Richard Opalka
Profile : http://community.jboss.org/people/richard.opalka@jboss.com

Andrew Dinn wrote:
*Q: So, which way round does it work?*

I'm affraid this is another question for our JAX-WS EG 
We implemented https://jira.jboss.org/jira/browse/JBWS-2486
because of *performance and lifecycle issues*.
There's @PostConstruct and @PreDestroy lifecycle requirement
in JAX-WS 2.2 spec that defines these lifecycle methods.
We had users who were complaining these methods were called
so many times, how many request came in, see:

However your usecase requires it to not be shared and be created instance per request.
This introduces real performance penalty that incorporates:
 * bean instantiation (calling constructor) (per request)
 * scanning the bean class for lifecycle annotations (@PostConstruct & @PreDestroy) (per request)
 * calling the @PostConstruct before method invocation (per request)
 * calling the @PreDestroy after method invocation (per request)
As you can see injecting WebServiceContext per request is really bad idea introduces in JAX-WS.
I'm really sorry I have to repeat it again, but *JAX-WS spec. is broken by design* 
This question needs to be clarified in JAX-WS spec.
PS1: I bet Sun RI also contains this reused service implementation we have.
PS2: JAX-WS endpoints according to JAX-WS spec are meant not to be used in concurrency scenarios 


To reply to this message visit the message page: http://community.jboss.org/message/526313#526313

More information about the jboss-user mailing list