Author: heiko.braun(a)jboss.com
Date: 2008-04-10 05:36:39 -0400 (Thu, 10 Apr 2008)
New Revision: 6318
Modified:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
Log:
Directly access EndpointRegistry through WSFRuntime
Modified:
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
---
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2008-04-10
09:36:07 UTC (rev 6317)
+++
framework/branches/hbraun/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2008-04-10
09:36:39 UTC (rev 6318)
@@ -21,14 +21,10 @@
*/
package org.jboss.wsf.framework.deployment;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that registers the endpoints
@@ -38,26 +34,19 @@
*/
public class EndpointRegistryDeploymentAspect extends DeploymentAspect
{
- private EndpointRegistry registry;
-
public void create(Deployment dep, WSFRuntime runtime)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry registry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
- registry.register(ep);
+ runtime.getEndpointRegistry().register(ep);
}
}
public void destroy(Deployment dep, WSFRuntime runtime)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry registry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
-
+ {
for (Endpoint ep : dep.getService().getEndpoints())
{
- registry.unregister(ep);
+ runtime.getEndpointRegistry().unregister(ep);
}
}
}
\ No newline at end of file
Show replies by date