Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.438 :

Posted: Thu Apr 14, 2011 5:25 am
by ETS User
One of the correct answers states:
The local client view (including the no-interface view) of an enterprise bean component defined within a .war file is only required to be accessible to components within the same .war file. Applications needing access to the local client view of an enterprise bean from a different module in the same application should use an ejb-jar file to define the enterprise bean that exposes the local client view.
Is this correct? If the .war is contained in an .ear, I think that EJBs from other .wars or EJB jars can access the the EJBs of the original war through using a local interface or no-interface view.

Re: About Question enthuware.oce-ejbd.v6.2.438 :

Posted: Thu Apr 14, 2011 7:39 am
by admin
This statement is from the specification itself. So I believe it is correct.

Re: About Question enthuware.oce-ejbd.v6.2.438 :

Posted: Tue Jan 01, 2013 12:17 pm
by aab
Not definitely clearly to me:
"Names of environment entries defined by an enterprise bean inside a .war can clash with names defined by other components in the same war."

I would change it into:
"Names of environment entries defined by an enterprise bean inside a .war shouldn't clash with names defined by other components in the same war."

Re: About Question enthuware.oce-ejbd.v6.2.438 :

Posted: Tue Jan 01, 2013 3:43 pm
by admin
aab,
What it is trying to say is that unlike the beans packaged in an ejb-jar file, where it is not possible to have name clashes between beans packaged in different ejb-jars (because even if you have a bean with same name in two ejb-jars, their JNDI names are different because the JNDI names include the ejb-jar module name), a clash of names is possible between two beans packaged in the same war. i.e. for beans packaged in ejb-jars, name clash cannot occur but for beans packaged in a war file, name clash can occur if the developer is not careful to name them differently.

HTH,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.438 :

Posted: Mon Jun 15, 2015 5:26 pm
by himaiMinh
For option 4 explanation, I think we can add a note:
"The EJB in a .jar in WEB-INF/lib is to make the code in .war file compile. The EJB has to be deployed in a container, and it should be looked up by callers by JNDI name, for example, java:global/RemoteEar/RemoteJar/RemoteBean!com.enthuware.RemoteInf"