private String deployDestinationInternal(String destinationMBeanConfig, ObjectName on,
String jndiName, boolean params, int fullSize,
int pageSize, int downCacheSize) throws Exception
{
MBeanServer mbeanServer = getServer();
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));
if (params)
{
mbeanServer.setAttribute(on, new Attribute("FullSize", new Integer(fullSize)));
mbeanServer.setAttribute(on, new Attribute("PageSize", new Integer(pageSize)));
mbeanServer.setAttribute(on, new Attribute("DownCacheSize", new Integer(downCacheSize)));
}
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
//
}