/** * Create an <code>ObjectName</code> for <code>ContextEnvironment</code> object. * * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public ObjectName createObjectName(ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { String path = ((Context)container).getPath(); if (path.length() < 1) path = "/"; Host host = (Host) ((Context)container).getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,path=" + path + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" +
/** * Create an <code>ObjectName</code> for this * <code>Service</code> object. * * @param domain Domain in which this name is to be created * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public static ObjectName createObjectName(String domain, ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { Context context = ((Context)container); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,context=" + cn.getDisplayName() + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
/** * Create an <code>ObjectName</code> for this * <code>Service</code> object. * * @param domain Domain in which this name is to be created * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public static ObjectName createObjectName(String domain, ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { Context context = ((Context)container); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,context=" + cn.getDisplayName() + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
/** * Create an <code>ObjectName</code> for this * <code>Service</code> object. * * @param domain Domain in which this name is to be created * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public static ObjectName createObjectName(String domain, ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { Context context = ((Context)container); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,context=" + cn.getDisplayName() + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
/** * Create an <code>ObjectName</code> for this * <code>Service</code> object. * * @param domain Domain in which this name is to be created * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public static ObjectName createObjectName(String domain, ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { Context context = ((Context)container); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,context=" + cn.getDisplayName() + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
/** * Create an <code>ObjectName</code> for this * <code>Service</code> object. * * @param domain Domain in which this name is to be created * @param environment The ContextEnvironment to be named * * @exception MalformedObjectNameException if a name cannot be created */ public static ObjectName createObjectName(String domain, ContextEnvironment environment) throws MalformedObjectNameException { ObjectName name = null; Object container = environment.getNamingResources().getContainer(); if (container instanceof Server) { name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Global,name=" + environment.getName()); } else if (container instanceof Context) { Context context = ((Context)container); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Environment" + ",resourcetype=Context,context=" + cn.getDisplayName() + ",host=" + host.getName() + ",name=" + environment.getName()); } return (name); }
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);
NamingResources nr = ce.getNamingResources(); nr.removeEnvironment(ce.getName()); nr.addEnvironment(ce);