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

Moderator: admin

Post Reply
ETS User

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

Post 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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

This statement is from the specification itself. So I believe it is correct.

aab

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

Post 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."

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

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

Post 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"

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests