Element element = Util.stringToElement(destinationMBeanConfig);  ServiceCreator sc = new ServiceCreator(mbeanServer);  ClassLoader cl = this.getClass().getClassLoader(); ObjectName loaderObjectName = null; if (cl instanceof UnifiedClassLoader3) { loaderObjectName = ((UnifiedClassLoader3)cl).getObjectName(); }  sc.install(on, loaderObjectName, element);   mbeanServer.setAttribute(on, new Attribute("ServerPeer", getServiceName())); mbeanServer.setAttribute(on, new Attribute("JNDIName", jndiName)); mbeanServer.invoke(on, "create", new Object[0], new String[0]); mbeanServer.invoke(on, "start", new Object[0], new String[0]);  return (String)mbeanServer.getAttribute(on, "JNDIName");
return createDestinationInternal(destinationMBeanConfig, on, jndiName, fullSize, pageSize, downCacheSize);
   private String createDestination(boolean isQueue, String name, String jndiName) throws Exception   {      //      // TODO - THIS IS A TEMPORARY IMPLEMENTATION; WILL BE REPLACED WITH INTEGRATION-CONSISTENT ONE      // TODO - if I find a way not using UnifiedClassLoader3 directly, then get rid of      //        <path refid="jboss.jmx.classpath"/> from jms/build.xml dependentmodule.classpath      //      String destType = isQueue ? "Queue" : "Topic";      String className = "org.jboss.jms.server.destination." + destType;      String ons ="jboss.messaging.destination:service="+ destType + ",name=" + name;      ObjectName on = new ObjectName(ons);      MBeanServer mbeanServer = getServer();      String destinationMBeanConfig =         "<mbean code=\"" + className + "\" " +         "       name=\"" + ons + "\" " +         "       xmbean-dd=\"xmdesc/" + destType + "-xmbean.xml\">\n" +         "    <constructor>" +         "        <arg type=\"boolean\" value=\"true\"/>" +         "    </constructor>" +         "</mbean>";      Element element = Util.stringToElement(destinationMBeanConfig);      ServiceCreator sc = new ServiceCreator(mbeanServer);      ClassLoader cl = this.getClass().getClassLoader();      ObjectName loaderObjectName = null;      if (cl instanceof UnifiedClassLoader3)      {         loaderObjectName = ((UnifiedClassLoader3)cl).getObjectName();      }      sc.install(on, loaderObjectName, element);      // inject dependencies      mbeanServer.setAttribute(on, new Attribute("ServerPeer", getServiceName()));      mbeanServer.setAttribute(on, new Attribute("JNDIName", jndiName));      mbeanServer.invoke(on, "create", new Object[0], new String[0]);      mbeanServer.invoke(on, "start", new Object[0], new String[0]);      return (String)mbeanServer.getAttribute(on, "JNDIName");      //      // end of TODO      //   }