String categoryName = config.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
String serviceName = config.getAttribute(ListenerTagNames.SERVICE_NAME_TAG);
String targetCategoryName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
String targetServiceName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
String listenerName = config.getAttribute(ListenerTagNames.NAME_TAG);
final LifecycleResourceManager lifecycleResourceManager = LifecycleResourceManager.getSingleton() ;
final String[] associatedDeployments = lifecycleResourceManager.getAssociatedDeployments() ;
final String deployment ;
if ((associatedDeployments != null) && (associatedDeployments.length == 1))
{
deployment = associatedDeployments[0] ;
}
else
{
deployment = lifecycleResourceManager.getIdentity() ;
}
StringBuffer objectName = new StringBuffer();
append(objectName, "deployment", deployment) ;
append(objectName, ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, categoryName) ;