Author: alessio.soldano(a)jboss.com
Date: 2011-01-20 06:00:58 -0500 (Thu, 20 Jan 2011)
New Revision: 13594
Modified:
common/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointRegistryFactory.java
Log:
Change on default endpoint registry factory for supporting AS 7
Modified:
common/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointRegistryFactory.java
===================================================================
---
common/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointRegistryFactory.java 2011-01-19
08:58:21 UTC (rev 13593)
+++
common/trunk/src/main/java/org/jboss/wsf/framework/management/DefaultEndpointRegistryFactory.java 2011-01-20
11:00:58 UTC (rev 13594)
@@ -42,6 +42,7 @@
private Logger log = Logger.getLogger(DefaultEndpointRegistryFactory.class);
/** The bean name in the kernel registry. */
private static final String BEAN_NAME = "WSEndpointRegistry";
+ private static final String SERVICE_NAME = "jboss.ws.registry";
private static final EndpointRegistry fallbackRegistry = new
DefaultEndpointRegistry();;
/**
@@ -65,9 +66,25 @@
final IoCContainerProxyFactory iocContainerFactory =
spiProvider.getSPI(IoCContainerProxyFactory.class);
final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
- return iocContainer.getBean(DefaultEndpointRegistryFactory.BEAN_NAME,
EndpointRegistry.class);
+ EndpointRegistry registry = null;
+ try
+ {
+ //try MSC service name
+ registry = iocContainer.getBean(DefaultEndpointRegistryFactory.SERVICE_NAME,
EndpointRegistry.class);
+ }
+ catch (Exception e)
+ {
+ log.debug("Can't get endpoint registry: ", e);
+ //ignore
+ }
+ if (registry == null)
+ {
+ //try MC bean name
+ registry = iocContainer.getBean(DefaultEndpointRegistryFactory.BEAN_NAME,
EndpointRegistry.class);
+ }
+ return registry;
}
- catch (WSFException e)
+ catch (Exception e)
{
log.warn("Unable to get WSEndpointRegistry from IoC, using default
one");
return fallbackRegistry; // JSE environment
Show replies by date