javaee / ejb-spec

See javax.ejb project for API. Contains legacy issues only.
https://github.com/javaee/javax.ejb
6 stars 1 forks source link

15.2 Deployment Descriptor leads to some misunderstanding #95

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

In EJB 3.2 PD, 15.2 Deployment Descriptor has been clarified, but it's still not fully clear not satisfying in my mind.

I think that with 15.4, it's better but there is still something painful. I mean, when you have a business layer package within an ejb-jar file. As per the current spec, it's considered as an independent Java EE Module when it's standalone or packaged as part as an EAR. Whereas it's not considered as an independent package when it is package part as a WAR file. In that last case, there is only one module it will belong to.

That makes things not really consistent and not convenient at all. From my experience, it leads to packaging issues and painful tasks.

Because we always use the same ejb-jar file either in EAR or in WAR. So we always have to package the deployment descriptor in the ejb-jar file itself. And we have to merge all ejb-jar.xml of all ejb-jar file embedded in a WAR during packaging, whereas they are picked up by the container when they are part of an EAR.

Moreover, it leads so scope issues with names for example.

We could try to enhance the behavior without breaking compatibility of course. Even if each ejb-jar file is not considered as a Java EE module within a WAR, we could ask container's provider to parse each ejb-jar.xml from any ejb-jar file in the WEB-INF/lib and merge them into an ejb-jar.xml as if the bean's provider did it manually.

If a conflict exist, then the deployment fails. If a WEB-INF/ejb-jar.xml exists, it overrides any merge information gathered from ejb-jar file.

Such a behavior would be helpful. We did it more or less in OpenEJB before Collapsed-EAR has been specified and can't remember exactly, but I guess JBoss AS also picks up any ejb-jar.xml file of any ejb-jar files.

Affected Versions

[3.2]

glassfishrobot commented 11 years ago

Reported by jlmonteiro

glassfishrobot commented 11 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EJB_SPEC-95