[Design of EJB 3.0] - Re: Inconsistent usage of the Ejb3Deployment.deploymentScope
by bstansberry@jboss.com
It's including an "ear=xxx" attribute in the ObjectName even though there is no ear, and is using the jar name as the attribute value.
This comes from o.j.e.javaee.JavaEEComponentHelper.createObjectName(JavaEEModule module, ...)
| StringBuilder sb = new StringBuilder(Ejb3Module.BASE_EJB3_JMX_NAME + ",");
| JavaEEApplication ear = module.getApplication();
| if (ear != null)
| {
| sb.append("ear=");
| sb.append(ear.getName());
| sb.append(",");
| }
| .....
|
The general concern I have is that existing code expects Ejb3Deployment.getApplication() and getEar() to return null if there is no ear involved. The above is the only usage I find for getApplication(). Searching for other uses of Ejb3Deployment.getEar() I find them in DeploymentPersistenceUnitResolver.getPersistenceUnitDeployment(), in the PersistenceUnitDeployment() constructor and in ProxyFactoryHelper.getDeploymentSummaryFromContainer().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150489#4150489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150489
17 years, 11 months
[Design of EJB 3.0] - Inconsistent usage of the Ejb3Deployment.deploymentScope fie
by bstansberry@jboss.com
Seeing some inconsistent usage of the org.jboss.ejb3.Ejb3Deployment class' deploymentScope field. This may be just due to ongoing refactoring, but want to point it out.
Looks like Ejb3Deployment treats the deploymentScope field as indicating the presence of an ear in the deployment -- see the getEar() and getApplication() methods which return it. But looking at Ejb3Deployer.deploy() in the AS, it looks like a JBoss5DeploymentScope will be created and passed to the Ejb3Deployment whether or not the deployment is an ear.
One place this shows up is in the creation of ObjectNames for beans. For example, deploying a bean named VMTrackerBean in a clusteredsession-test.jar with no enclosing ear results in the following object name for the bean:
jboss.j2ee:ear=clusteredsession-test.jar,jar=clusteredsession-test.jar,name=VMTrackerBean,service=EJB3
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150478#4150478
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150478
17 years, 11 months