本文整理了Java中org.apache.geronimo.kernel.Naming.createRootName()
方法的一些代码示例,展示了Naming.createRootName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Naming.createRootName()
方法的具体详情如下:
包路径:org.apache.geronimo.kernel.Naming
类名称:Naming
方法名:createRootName
暂无
代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb
private AbstractName getUnqiueName(String gbeanName) {
AbstractName beanName = kernel.getNaming().createRootName(name.getArtifact(), gbeanName, "NetworkConnector");
int i = 1;
while (kernel.isLoaded(beanName)) {
beanName = kernel.getNaming().createRootName(name.getArtifact(), gbeanName + "-" + i, "NetworkConnector");
i++;
}
return beanName;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-kernel
public GBeanData addGBean(String name, GBeanInfo gbeanInfo, Naming naming, Environment environment) {
if (gbeanState != null) {
throw new IllegalStateException("GBeans have been serialized, so no more GBeans can be added");
}
String j2eeType = gbeanInfo.getJ2eeType();
if (j2eeType == null) j2eeType = "GBean";
AbstractName abstractName = naming.createRootName(environment.getConfigId(), name, j2eeType);
GBeanData gBeanData = new GBeanData(abstractName, gbeanInfo);
addGBean(gBeanData);
return gBeanData;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-kernel
public GBeanData addGBean(String name, GBeanInfo gbeanInfo, Naming naming, Environment environment) {
if (gbeanState != null) {
throw new IllegalStateException("GBeans have been serialized, so no more GBeans can be added");
}
String j2eeType = gbeanInfo.getJ2eeType();
if (j2eeType == null) j2eeType = "GBean";
AbstractName abstractName = naming.createRootName(environment.getConfigId(), name, j2eeType);
GBeanData gBeanData = new GBeanData(abstractName, gbeanInfo);
addGBean(gBeanData);
return gBeanData;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-kernel
public synchronized AbstractName addGBean(String name, GBeanData gbean) throws GBeanAlreadyExistsException {
AbstractName abstractName = gbean.getAbstractName();
if (abstractName != null) {
throw new IllegalArgumentException("gbean already has an abstract name: " + abstractName);
}
String j2eeType = gbean.getGBeanInfo().getJ2eeType();
if (j2eeType == null) j2eeType = "GBean";
abstractName = naming.createRootName(id, name, j2eeType);
gbean.setAbstractName(abstractName);
if (gbeans.containsKey(abstractName)) {
throw new GBeanAlreadyExistsException(gbean.getAbstractName().toString());
}
gbeans.put(abstractName, gbean);
return abstractName;
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat-builder
earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.WEB_MODULE);
} else {
代码示例来源:origin: org.apache.geronimo.modules/geronimo-openejb-builder
AbstractName earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.EJB_MODULE);
} else {
代码示例来源:origin: org.apache.geronimo.modules/geronimo-concurrent
public void doStart() throws Exception {
String threadName = (String)this.name.getName().get("name");
this.executorServiceName = kernel.getNaming().createRootName(name.getArtifact(), threadName, ManagedConstants.MANAGED_EXECUTOR_SERVICE);
GBeanData executorServiceData = new GBeanData(this.executorServiceName, ServerManagedScheduledExecutorServiceGBean.getGBeanInfo());
executorServiceData.setAttribute("contextHandlers", this.contextHandlerClasses);
executorServiceData.setAttribute("corePoolSize", this.corePoolSize);
GBeanData wrapperData = kernel.getGBeanData(this.name);
executorServiceData.setReferencePatterns("threadFactory",
wrapperData.getReferencePatterns("threadFactory"));
addGBeanKernel(this.executorServiceName, executorServiceData);
this.executorServiceGBean = (ServerManagedScheduledExecutorServiceGBean)kernel.getGBean(this.executorServiceName);
this.executorServiceGBean.verifyObjectName();
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-concurrent
protected void addThreadGBean(GeronimoManagedThread thread) {
AbstractName aName = kernel.getNaming().createRootName(name.getArtifact(), thread.getName(), ManagedConstants.MANAGED_THREAD);
GBeanData threadData = new GBeanData(aName, ManagedThreadGBean.getGBeanInfo());
try {
// use either addGBeanKernel() or addGBeanConfiguration()
addGBeanKernel(aName, threadData);
ManagedThreadGBean threadGBean = (ManagedThreadGBean)kernel.getGBean(aName);
threadGBean.verifyObjectName();
// let gbean know about the thread
threadGBean.setManagedThread(thread);
// let thread know about the gbean
thread.setGbean(threadGBean);
// send JMX notification
sendNotification(threadGBean);
} catch (Exception e) {
LOG.warn("Failed to add thread gbean", e);
}
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-jetty6-builder
earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.WEB_MODULE);
} else {
代码示例来源:origin: org.apache.geronimo.modules/geronimo-j2ee-builder
AbstractName earName = naming.createRootName(artifact, artifact.toString(), NameFactory.J2EE_APPLICATION);
namingBuilders.buildEnvironment(application, gerApplication, environment);
代码示例来源:origin: org.apache.geronimo.modules/geronimo-concurrent
public void doStart() throws Exception {
String threadName = (String)this.name.getName().get("name");
this.threadFactoryName = kernel.getNaming().createRootName(name.getArtifact(), threadName, ManagedConstants.MANAGED_THREAD_FACTORY);
GBeanData threadFactoryData = new GBeanData(this.threadFactoryName, ManagedThreadFactoryGBean.getGBeanInfo());
threadFactoryData.setAttribute("contextHandlers", this.contextHandlerClasses);
threadFactoryData.setAttribute("groupName", this.groupName);
threadFactoryData.setAttribute("priority", this.threadPriority);
threadFactoryData.setAttribute("daemon", this.daemonThread);
threadFactoryData.setAttribute("hungTaskThreshold", this.hungTaskThreshold);
threadFactoryData.setAttribute("hungTaskMonitorFrequency", this.hungTaskMonitorFrequency);
addGBeanKernel(this.threadFactoryName, threadFactoryData);
this.threadFactoryGBean = (ManagedThreadFactoryGBean)kernel.getGBean(this.threadFactoryName);
this.threadFactoryGBean.verifyObjectName();
}
代码示例来源:origin: org.apache.geronimo.plugins/activemq-portlets
configurationData.getEnvironment().addDependency(new Dependency(ACTIVEMQ_ARTIFACT, ImportType.ALL));
AbstractName adminObjectName = kernel.getNaming().createRootName(configId, destinationName, NameFactory.JCA_ADMIN_OBJECT);
代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder-1_6
AbstractName earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.RESOURCE_ADAPTER_MODULE);
} else {
代码示例来源:origin: org.apache.geronimo.modules/geronimo-concurrent
public void doStart() throws Exception {
String threadName = (String)this.name.getName().get("name");
this.executorServiceName = kernel.getNaming().createRootName(name.getArtifact(), threadName, ManagedConstants.MANAGED_EXECUTOR_SERVICE);
GBeanData executorServiceData = new GBeanData(this.executorServiceName, ServerManagedExecutorServiceGBean.getGBeanInfo());
executorServiceData.setAttribute("contextHandlers", this.contextHandlerClasses);
executorServiceData.setAttribute("minPoolSize", this.minPoolSize);
executorServiceData.setAttribute("maxPoolSize", this.maxPoolSize);
executorServiceData.setAttribute("keepAliveTime", this.keepAliveTime);
executorServiceData.setAttribute("queueCapacity", this.queueCapacity);
GBeanData wrapperData = kernel.getGBeanData(this.name);
executorServiceData.setReferencePatterns("threadFactory",
wrapperData.getReferencePatterns("threadFactory"));
addGBeanKernel(this.executorServiceName, executorServiceData);
this.executorServiceGBean = (ServerManagedExecutorServiceGBean)kernel.getGBean(this.executorServiceName);
this.executorServiceGBean.verifyObjectName();
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-connector-builder
earName = naming.createRootName(environment.getConfigId(), NameFactory.NULL, NameFactory.J2EE_APPLICATION);
moduleName = naming.createChildName(earName, environment.getConfigId().toString(), NameFactory.RESOURCE_ADAPTER_MODULE);
} else {
代码示例来源:origin: org.apache.geronimo.framework/geronimo-service-builder
AbstractName moduleName = naming.createRootName(configId, configId.toString(), SERVICE_MODULE);
File tempDirectory = FileUtils.createTempDir();
context = new DeploymentContext(tempDirectory,
内容来源于网络,如有侵权,请联系作者删除!