All,
the recent JAX-WS changes on the InstanceResolver that removed the
method InstanceResolver.createInvoker() from changeset
http://fisheye5.cenqua.com/changelog/jax-ws-sources?cs=MAIN:jitu:20070705210929
and the follow-up change to class
org.jvnet.jax_ws_commons.spring.SpringService between release 1.4 and
1.5 of the JAX-WS Spring integration to remove this line of code:
this.invoker = InstanceResolver.createSingleton(sei).createInvoker();
from method public void setBean(Object sei) at line 139 have caused to
*break existing code* for me:
My service definition looks like the following:
<bean id="notificationConsumer"
class="com.sun.germany.vine2.wsn.consumer.NotificationConsumerImpl"
scope="prototype" />
<bean id="svcNotificationConsumer"
class="com.sun.germany.vine2.wsn.consumer.NotificationConsumerSvc"
scope="prototype">
<property name="delegate" ref="notificationConsumer" />
</bean>
<ws:service id="notificationConsumerService"
bean="#svcNotificationConsumer" />
<wss:binding url="/services/NotificationConsumer"
service="#notificationConsumerService" />
This means, my service implementation class relies on a property to be
injected by the Spring bean factory during its creation.
This used to work fine, as line 139 (as shown above), used to call
InstanceResolver.createSingleton(sei)
thereby passing my service implementation object instance.
After the change, the call stack looks as follows:
SpringService.getObject() calls into WSEndpoint.create(), which then
calls EndpointFactory.createEndpoint().
At line 140 of the (updated) class EndpointFactory, the code reads
if (invoker == null) {
invoker =
createInvoker(InstanceResolver.createDefault(implType));
}
and as - without line 139 of SpringService (see above), we don't already
have an invoker object existing, so
createInvoker(InstanceResolver.createDefault(implType)
is called, which only leads to a call to the no-args constructor on my
service implementation class, but does *not* cause any properties to be
injected by the Spring bean factory and makes my code break.
Unfortunately, I am not familiar enough with the JAX-WS code base, I
don't know whether it might be sufficient as a fix to reinsert a line
139 into SpringService that only reads:
InstanceResolver.createSingleton(sei);
but I definitely hope that this can be fixed.
For now, I have reverted to use a JAX-WS build before the above
mentioned changeset got applied and stay with Spring integration 1.4,
but I'll need this issue resolved as I will have to use WSIT 1.0 FCS
when it becomes available.
In case it won't be possible to inject properties into the service
implementation class any more, this makes the whole concept of a Spring
integration for JAX-WS services basically useless...
Thanks in advance for any help, best regards
Andreas
--
Andreas Loew
Java Architect
Sun Microsystems (Germany)