Author: thomas.diesler(a)jboss.com
Date: 2007-08-01 11:33:59 -0400 (Wed, 01 Aug 2007)
New Revision: 4061
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/serviceref/ServiceRefHandlerImpl.java
Log:
Fix ref to ServiceRefBinder
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/serviceref/ServiceRefHandlerImpl.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/serviceref/ServiceRefHandlerImpl.java 2007-08-01
15:18:43 UTC (rev 4060)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/serviceref/ServiceRefHandlerImpl.java 2007-08-01
15:33:59 UTC (rev 4061)
@@ -37,8 +37,12 @@
import org.jboss.ws.integration.ServiceRefMetaData;
import org.jboss.ws.integration.URLLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.serviceref.ServiceRefBinder;
+import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
+import org.jboss.wsf.spi.serviceref.ServiceRefHandler.Type;
import org.jboss.xb.binding.UnmarshallingContext;
import org.xml.sax.Attributes;
@@ -52,22 +56,16 @@
private ServiceRefObjectFactory objectFactory = new ServiceRefObjectFactory();
- enum Type {JAXRPC, JAXWS};
-
- /* binds jaxrpc deployments */
- private ServiceRefBinder jaxrpcBinder;
-
- /* binds jaxws deployments */
- private ServiceRefBinder jaxwsBinder;
-
- public void setJaxrpcBinder(ServiceRefBinder binder)
+ private ServiceRefBinder getJaxrpcBinder()
{
- this.jaxrpcBinder = binder;
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ return
spiProvider.getSPI(ServiceRefBinderFactory.class).newServiceRefBinder(Type.JAXRPC);
}
- public void setJaxwsBinder(ServiceRefBinder binder)
+ private ServiceRefBinder getJaxwsBinder()
{
- this.jaxwsBinder = binder;
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ return
spiProvider.getSPI(ServiceRefBinderFactory.class).newServiceRefBinder(Type.JAXRPC);
}
public ServiceRefMetaData newServiceRefMetaData()
@@ -120,12 +118,12 @@
{
if (getServiceRefType(serviceRef, loader) == Type.JAXRPC)
{
- jaxrpcBinder.setupServiceRef(encCtx, encName, null, serviceRef.delegate,
loader);
+ getJaxrpcBinder().setupServiceRef(encCtx, encName, null, serviceRef.delegate,
loader);
}
else
{
AnnotatedElement anElement = (AnnotatedElement)sref.getAnnotatedElement();
- jaxwsBinder.setupServiceRef(encCtx, encName, anElement, serviceRef.delegate,
loader);
+ getJaxwsBinder().setupServiceRef(encCtx, encName, anElement,
serviceRef.delegate, loader);
}
}
finally
Show replies by date