org.apache.geronimo.kernel.Naming.createSiblingName()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中org.apache.geronimo.kernel.Naming.createSiblingName()方法的一些代码示例,展示了Naming.createSiblingName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Naming.createSiblingName()方法的具体详情如下:
包路径:org.apache.geronimo.kernel.Naming
类名称:Naming
方法名:createSiblingName

Naming.createSiblingName介绍

暂无

代码示例

代码示例来源:origin: org.apache.geronimo.modules/geronimo-activemq

protected void startConnectorWrapperGBeans(AbstractName brokerAbstractName) {
  try {
    BrokerService brokerService = ((BrokerServiceGBean) kernel.getGBean(brokerAbstractName)).getBrokerContainer();
    List<AbstractName> connectorNames = new ArrayList<AbstractName>();
    GBeanInfo gBeanInfo = new AnnotationGBeanInfoFactory().getGBeanInfo(ActiveMQTransportConnector.class);
    for (TransportConnector transportConnector : brokerService.getTransportConnectors()) {
      AbstractName connectorAbName = kernel.getNaming().createSiblingName(brokerAbstractName, transportConnector.getUri().toString().replace(':', '_'), GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
      GBeanData gbeanData = new GBeanData(connectorAbName, gBeanInfo);
      gbeanData.setAttribute("transportConnector", transportConnector);
      kernel.loadGBean(gbeanData, classLoader);
      kernel.startGBean(connectorAbName);
      connectorNames.add(connectorAbName);
    }
    brokerNameConnectorNamesMap.put(brokerAbstractName, connectorNames);
  } catch (Exception e) {
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-security

aName = kernel.getNaming().createSiblingName(myName, name, NameFactory.KEYSTORE_INSTANCE);
GBeanData data = new GBeanData(aName, FileKeystoreInstance.getGBeanInfo());
try {

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

public AbstractName getConnectorConfiguration(ConnectorType connectorType, List<ConnectorAttribute> connectorAttributes, WebContainer container, String uniqueName) {
  GBeanInfo gbeanInfo = CONNECTOR_GBEAN_INFOS.get(connectorType);
  AbstractName containerName = kernel.getAbstractNameFor(container);
  AbstractName name = kernel.getNaming().createSiblingName(containerName, uniqueName, GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
  GBeanData gbeanData = new GBeanData(name, gbeanInfo);
  gbeanData.setAttribute("name", uniqueName);
  gbeanData.setReferencePattern(ConnectorGBean.CONNECTOR_CONTAINER_REFERENCE, containerName);
  Map<String, Object> initParams = new HashMap<String, Object>();
  for (ConnectorAttribute connectorAttribute : connectorAttributes) {
    gbeanData.setAttribute(connectorAttribute.getAttributeName(), connectorAttribute.getValue());
    initParams.put(connectorAttribute.getAttributeName(), connectorAttribute.getStringValue());
  }
  
  gbeanData.setAttribute("initParams", initParams);
  AbstractNameQuery query = new AbstractNameQuery(ServerInfo.class.getName());
  Set set = kernel.listGBeans(query);
  
  AbstractName serverInfo = (AbstractName) set.iterator().next();
  gbeanData.setReferencePattern("ServerInfo", serverInfo);
  try {
    kernel.loadGBean(gbeanData, container.getClass().getClassLoader());
    kernel.startGBean(name);
  } catch (Exception e) {
    log.error("Error when adding new tomcat connector" + uniqueName, e);
  }
  return name;
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat

AbstractName name = kernel.getNaming().createSiblingName(containerName, uniqueName, NameFactory.GERONIMO_SERVICE);
GBeanData connector;
if(protocol.equals(PROTOCOL_HTTP)) {

代码示例来源:origin: org.apache.geronimo.modules/geronimo-tomcat6

AbstractName name = kernel.getNaming().createSiblingName(containerAbstractName, uniqueName,
    GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
server.getService(null);

代码示例来源:origin: org.apache.geronimo.plugins/console-base-portlets

AbstractName certStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-store", SecurityNames.CERTIFICATE_STORE);
GBeanData certStore = new GBeanData(certStoreName, FileCertificateStore.GBEAN_INFO);
certStore.setAttribute("directoryPath", URI.create(certStorePath));
AbstractName certReqStoreName = naming.createSiblingName(caKeystoreName, "geronimo-ca-cert-req-store", SecurityNames.CERTIFICATE_REQUEST_STORE);
GBeanData certReqStore = new GBeanData(certReqStoreName, FileCertificateRequestStore.GBEAN_INFO);
certReqStore.setAttribute("directoryPath", URI.create(certReqStorePath));
AbstractName caName = naming.createSiblingName(caKeystoreName, "geronimo-ca", SecurityNames.CERTIFICATION_AUTHORITY);
GBeanData ca = new GBeanData(caName, GeronimoCertificationAuthority.GBEAN_INFO);
ca.setReferencePattern("ServerInfo", serverInfoName);

相关文章