private static final String oid(Container container) { return container.getObjectName().getCanonicalName(); }
public static final String guid(Container container, VMID vmid) { return container.getObjectName().getCanonicalName() + ",VMID=" + vmid; }
private void generateContainerName(Container container, JBossEnterpriseBeanMetaData beanMD) { ObjectName on = container.getObjectName(); assert on!=null : "ObjectName was null"; // Heiko: This should actually generate the name and assign it to ejb3 meta data // Currently we stick to copying the values around until an EJB3 team member figures out a proper way beanMD.setGeneratedContainerName(on.getCanonicalName()); }
public static final String clusterUid(Container container) { if (container.isClustered()) return container.getObjectName().getCanonicalName() + ",Partition=" + ((EJBContainer)container).getPartitionName(); return container.getObjectName().getCanonicalName(); }
protected void processEJBContainerMetadata(Container container) throws Exception { log.trace("Process EJB container metadata " + container); ObjectName on = container.getObjectName(); ejbContainers.put(on, container); container.processMetadata(); }
protected void registerEJBContainer(Container container) throws Exception { ObjectName on = container.getObjectName(); String name = on.getCanonicalName(); DependencyPolicy dependsPolicy = container.getDependencyPolicy(); dependsPolicy.addDependency("jboss.ejb:service=EJBTimerService"); kernelAbstraction.install(name, dependsPolicy, unit, container); mbeanServer.registerMBean(container.getMBean(), on); log.debug("Bound ejb3 container " + name); }
this.ejbContainers.put(con.getObjectName(), con); Ejb3Registry.register(con);
protected void deployElement(Ejb3HandlerFactory factory, ClassFile cf, InitialContext ctx) throws Exception { Ejb3Handler handler = factory.createHandler(cf); handler.setCtxProperties(unit.getJndiProperties()); if (handler.isEjb() || handler.isJBossBeanType()) { List<Container> containers = handler.getContainers(cf, this); for (Container con : containers) { // EJBContainer has finished with all metadata initialization from XML files and such. // this is really a hook to do some processing after XML has been set up and before // and processing of dependencies and such. try { ((EJBContainer) con).instantiated(); this.ejbContainers.put(con.getObjectName(), con); Ejb3Registry.register(con); } catch (Throwable t) { throw new DeploymentException( "Error creating ejb container " + con.getEjbName() + ": " + t.getMessage(), t); } } } }