public static Object createRegistryId(Object primKey, Object deployId, Container contnr) { return "" + deployId + contnr.getContainerID(); }
try { final Container container = deployment.getContainer(); if (container.getBeanContext(deployment.getDeploymentID()) == null) { container.deploy(deployment); if (!((String) deployment.getDeploymentID()).endsWith(".Comp") && !deployment.isHidden()) { logger.info("createApplication.createdEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID()); try { final Container container = deployment.getContainer(); container.start(deployment); if (!((String) deployment.getDeploymentID()).endsWith(".Comp") && !deployment.isHidden()) { logger.info("createApplication.startedEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID());
try { Container container = deployment.getContainer(); container.deploy(deployment); log.info("createApplication.createdEjb" + deployment.getDeploymentID() + deployment.getEjbName() + container.getContainerID()); if (log.isDebugEnabled()) { for (Map.Entry<Object, Object> entry : deployment.getProperties().entrySet()) { try { Container container = deployment.getContainer(); container.start(deployment); log.info("createApplication.startedEjb" + deployment.getDeploymentID() + deployment.getEjbName() + container.getContainerID()); } catch (Throwable t) { throw new OpenEJBException("Error starting '"+deployment.getEjbName()+"'. Exception: "+t.getClass()+": "+t.getMessage(), t);
for (int i = 0; i < c.length; i++) { String entry = " "; switch (c[i].getContainerType()) { case BMP_ENTITY: entry += "BMP ENTITY "; break; entry += c[i].getContainerID(); logger.debug("startup.debugEntry", entry);
try { Container container = deployment.getContainer(); container.deploy(deployment); logger.info("createApplication.createdEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID()); } catch (Throwable t) { throw new OpenEJBException("Error deploying '"+deployment.getEjbName()+"'. Exception: "+t.getClass()+": "+t.getMessage(), t);
container = containerSystem.getContainer(containerInfo.id); List<TreeEntry> containers = null; if (containerMap.get(container.getContainerType()) != null) { containerTypesEntry = containerMap.get(container.getContainerType()); containers = containerTypesEntry.getChildren(); } else { containerTypesEntry = new TreeEntry(); containerTypesEntry.setName(resolveContainerTypes(container.getContainerType())); containerTypesEntry.setValues(new String[]{containerTypesEntry.getName()}); containers = new ArrayList<TreeEntry>(); containerTypesEntry.setChildren(containers); containerMap.put(container.getContainerType(),containerTypesEntry); entries.add(containerTypesEntry); containersEntry.setValues(new String[]{containerInfo.id}); BeanContext[] deployments = container.getBeanContexts(); containersEntry.setChildren(getDeployments(deployments)); containers.add(containersEntry);
Container container = containerSystem.getContainer(containerId); BeanContext beanContext = container .getBeanContext(deploymentId); List<EjbInformation> informations = new ArrayList<EjbInformation>(); EjbInformation information = new EjbInformation(); informations.add(information); if (!container.getContainerType().equals(ContainerType.MESSAGE_DRIVEN)) { information = new EjbInformation(); Class cls = null;
@ManagedAttribute @Description("Container type.") public String getContainerType() { return container.getContainerType().name().toLowerCase().replace("_", " "); }
try { final Container container = bc.getContainer(); container.stop(bc); } catch (final Throwable t) { undeployException.getCauses().add(new Exception("bean: " + deploymentID + ": " + t.getMessage(), t)); try { final Container container = bean.getContainer(); container.undeploy(bean); bean.setContainer(null); } catch (final Throwable t) {
@ManagedAttribute @Description("Container managed beans.") public String[] getManagedBeans() { final BeanContext[] beans = container.getBeanContexts(); final String[] beanNames = new String[beans.length]; int i = 0; for (final BeanContext bc : beans) { beanNames[i++] = new StringBuilder("bean-class: ").append(bc.getBeanClass().getName()).append(", ") .append("ejb-name: ").append(bc.getEjbName()).append(", ") .append("deployment-id: ").append(bc.getDeploymentID()).append(", ") .toString(); } return beanNames; }
public EJBObject getEJBObject() throws IllegalStateException { check(Call.getEJBObject); final ThreadContext threadContext = ThreadContext.getThreadContext(); final BeanContext di = threadContext.getBeanContext(); if (di.getRemoteInterface() == null) { throw new IllegalStateException("EJB " + di.getDeploymentID() + " does not have a remote interface"); } final EjbObjectProxyHandler handler = new EntityEjbObjectHandler(di.getContainer().getBeanContext(di.getDeploymentID()), threadContext.getPrimaryKey(), InterfaceType.EJB_OBJECT, new ArrayList<Class>(), di.getRemoteInterface()); try { final Class[] interfaces = new Class[]{di.getRemoteInterface(), IntraVmProxy.class}; return (EJBObject) ProxyManager.newProxyInstance(interfaces, handler); } catch (final IllegalAccessException iae) { throw new InternalErrorException("Could not create IVM proxy for " + di.getRemoteInterface() + " interface", iae); } }
try { Container container = deployment.getContainer(); container.undeploy(deployment); deployment.setContainer(null); } catch (Throwable t) {
try { final Container container = deployment.getContainer(); if (container.getBeanContext(deployment.getDeploymentID()) == null) { container.deploy(deployment); if (!((String) deployment.getDeploymentID()).endsWith(".Comp") && !deployment.isHidden()) { logger.info("createApplication.createdEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID()); try { final Container container = deployment.getContainer(); container.start(deployment); if (!((String) deployment.getDeploymentID()).endsWith(".Comp") && !deployment.isHidden()) { logger.info("createApplication.startedEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID());
for (final Container aC : c) { String entry = " "; switch (aC.getContainerType()) { case BMP_ENTITY: entry += "BMP ENTITY "; break; entry += aC.getContainerID(); logger.debug("startup.debugEntry", entry);
@ManagedAttribute @Description("Container type.") public String getContainerType() { return container.getContainerType().name().toLowerCase().replace("_", " "); }
try { final Container container = deployment.getContainer(); container.stop(deployment); } catch (final Throwable t) { undeployException.getCauses().add(new Exception("bean: " + deploymentID + ": " + t.getMessage(), t)); try { final Container container = bean.getContainer(); container.undeploy(bean); bean.setContainer(null); } catch (final Throwable t) {
@ManagedAttribute @Description("Container managed beans.") public String[] getManagedBeans() { final BeanContext[] beans = container.getBeanContexts(); final String[] beanNames = new String[beans.length]; int i = 0; for (final BeanContext bc : beans) { beanNames[i++] = new StringBuilder("bean-class: ").append(bc.getBeanClass().getName()).append(", ") .append("ejb-name: ").append(bc.getEjbName()).append(", ") .append("deployment-id: ").append(bc.getDeploymentID()).append(", ") .toString(); } return beanNames; }
public EJBObject getEJBObject() throws IllegalStateException { doCheck(Call.getEJBObject); final ThreadContext threadContext = ThreadContext.getThreadContext(); final BeanContext di = threadContext.getBeanContext(); if (di.getRemoteInterface() == null) { throw new IllegalStateException("EJB " + di.getDeploymentID() + " does not have a remote interface"); } final EjbObjectProxyHandler handler = new EntityEjbObjectHandler(di.getContainer().getBeanContext(di.getDeploymentID()), threadContext.getPrimaryKey(), InterfaceType.EJB_OBJECT, new ArrayList<Class>(), di.getRemoteInterface()); try { final Class[] interfaces = new Class[]{di.getRemoteInterface(), IntraVmProxy.class}; return (EJBObject) ProxyManager.newProxyInstance(interfaces, handler); } catch (final IllegalAccessException iae) { throw new InternalErrorException("Could not create IVM proxy for " + di.getRemoteInterface() + " interface", iae); } }
public static Object createRegistryId(Object primKey, Object deployId, Container contnr) { return "" + deployId + contnr.getContainerID(); }
for (int i = 0; i < c.length; i++) { String entry = " "; switch (c[i].getContainerType()) { case BMP_ENTITY: entry += "BMP ENTITY "; break; entry += c[i].getContainerID(); logger.debug("startup.debugEntry", entry);