aspects = new ArrayList<String>(); bindings = new ArrayList<String>(); manager = def.getManager(); undeployTopElements(element); bulkUndeploy();
DomainDefinition parentDef = manager.getContainer(extend); if (parentDef == null) throw new RuntimeException("unable to find parent Domain: " + extend); parent = parentDef.getManager(); DomainDefinition def = new DomainDefinition(name, parent, parentFirst, inheritDefs, inheritBindings); AspectManager push = manager; try manager = def.getManager(); deployTopElements(element);
public void addContainer(DomainDefinition def) { initContainersMap(); containers.put(def.getName(), def); }
protected ConsumerContainer getConsumerContainer(int ejbIndex, JBossConsumerBeanMetaData beanMetaData) throws Exception { String containerName = getAspectDomain(ejbIndex, defaultConsumerDomain); DomainDefinition domain = AspectManager.instance().getContainer(containerName); if (domain == null) { throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass() + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '" + containerName + "'"); } return new ConsumerContainer(ejbNames.get(ejbIndex), (Domain) domain.getManager(), di.getClassLoader(), className, ctxProperties, deployment, beanMetaData); }
protected StatefulContainer getStatefulContainer(int ejbIndex, JBossSessionBeanMetaData beanMetaData) throws Exception { String containerName = getAspectDomain(ejbIndex, defaultSFSBDomain); DomainDefinition domain = AspectManager.instance().getContainer(containerName); if (domain == null) { throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass() + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '" + containerName + "'"); } return new StatefulContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex), (Domain) domain.getManager(), ctxProperties, deployment, beanMetaData, deployment .getAsynchronousProcessor()); }
protected EJBContainer getStatelessContainer(int ejbIndex, JBossSessionBeanMetaData beanMetaData) throws Exception { String containerName = getAspectDomain(ejbIndex, defaultSLSBDomain); DomainDefinition domain = AspectManager.instance().getContainer(containerName); if (domain == null) { throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass() + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '" + containerName + "'"); } return new StatelessContainer(di.getClassLoader(), className, ejbNames.get(ejbIndex), (Domain) domain .getManager(), ctxProperties, deployment, beanMetaData, deployment.getAsynchronousProcessor()); }
protected ServiceContainer getServiceContainer(int ejbIndex, JBossServiceBeanMetaData beanMetaData) throws Exception { String containerName = getAspectDomain(ejbIndex, defaultServiceDomain); DomainDefinition domain = AspectManager.instance().getContainer(containerName); if (domain == null) { throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass() + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '" + containerName + "'"); } return new ServiceContainer(deployment.getMbeanServer(), di.getClassLoader(), className, ejbNames.get(ejbIndex), (Domain) domain.getManager(), ctxProperties, deployment, beanMetaData); }
protected MDB getMDB(int ejbIndex, JBossMessageDrivenBeanMetaData beanMetaData) throws Exception { String domainName = getMDBDomainName(ejbIndex); String containerName = getAspectDomain(ejbIndex, domainName); DomainDefinition domain = AspectManager.instance().getContainer(containerName); if (domain == null) { throw new RuntimeException("Could not get container for bean class " + beanMetaData.getEjbClass() + " with bean name " + beanMetaData.getEjbName() + " because no container configured with name '" + containerName + "'"); } MDB container = new MDB(ejbNames.get(ejbIndex), (Domain) domain.getManager(), di.getClassLoader(), className, ctxProperties, deployment, beanMetaData); // EJB 3.0 5.6.3: the class or any super-class may implement the ejbCreate method Method method = getMethod(container.getBeanClass(), "ejbCreate"); if(method != null) { addAnnotation(new PostConstructImpl(), container, method); } return container; }