private static String componentType(final BeanType componentType) { if (componentType == null) { return "unknown"; } return componentType.name(); }
private static String componentType(final BeanType componentType) { if (componentType == null) { return "unknown"; } return componentType.name(); }
public void begin(DeploymentInfo deploymentInfo) { this.deploymentInfo = deploymentInfo; EnterpriseBeanInfo beanInfo = beanInfos.get(deploymentInfo.getDeploymentID()); templates = new HashMap<String, StringTemplate>(); templates.put("", template); for (JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) intrface = ""; templates.put(intrface, new StringTemplate(nameInfo.name)); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); beanContext = new HashMap<String, String>(appContext); putAll(beanContext, deploymentInfo.getProperties()); beanContext.put("moduleId", deploymentInfo.getModuleID()); beanContext.put("ejbType", deploymentInfo.getComponentType().name()); beanContext.put("ejbClass", deploymentInfo.getBeanClass().getName()); beanContext.put("ejbClass.simpleName", deploymentInfo.getBeanClass().getSimpleName()); beanContext.put("ejbClass.packageName", packageName(deploymentInfo.getBeanClass())); beanContext.put("ejbName", deploymentInfo.getEjbName()); beanContext.put("deploymentId", deploymentInfo.getDeploymentID().toString()); }
@ManagedAttribute @Description("The EJB endpoint type") public String getComponentType() { return beanContext.getComponentType().name(); }
@ManagedAttribute @Description("The EJB endpoint type") public String getComponentType() { return beanContext.getComponentType().name(); }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }