{
log.warn("Unknown destination type '" + destinationType + "' for " + mdb.getName());
return null;
}
ServiceMetaData result = new ServiceMetaData();
result.setConstructor(new ServiceConstructorMetaData());
ObjectName objectName;
if (isTopic)
{
objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=" + destinationName);
result.setCode("org.jboss.jms.server.destination.TopicService");
result.setXMBeanDD("xmdesc/Topic-xmbean.xml");
}
else
{
objectName = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=" + destinationName);
result.setCode("org.jboss.jms.server.destination.QueueService");
result.setXMBeanDD("xmdesc/Queue-xmbean.xml");
}
result.setObjectName(objectName);
ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
attribute.setName("JNDIName");
attribute.setValue(new ServiceTextValueMetaData(destinationName));
result.addAttribute(attribute);
attribute = new ServiceAttributeMetaData();
attribute.setName("ServerPeer");
attribute.setValue(new ServiceTextValueMetaData(serverPeerName));
result.addAttribute(attribute);
ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
dependency.setIDependOn(serverPeerName);
result.addDependency(dependency);
dependency = new ServiceDependencyMetaData();
dependency.setIDependOn(postOfficeName);
result.addDependency(dependency);
// Add this mbean to the mdbs depends
Set<String> depends = mdb.getDepends();
if (depends == null)
{