aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Sharing same EJB 3.1 project in two (or more) EAR projects. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Sharing same EJB 3.1 project in two (or more) EAR projects." Watch "Sharing same EJB 3.1 project in two (or more) EAR projects." New topic
Author

Sharing same EJB 3.1 project in two (or more) EAR projects.

Claude Moore
Ranch Hand

Joined: Jun 24, 2005
Posts: 266
    
    1
Good morning,

I have the following scenario:
- An EJB 3.1 project;
- A first EAR Project (AlfaEAR) which includes the EJB project
- A second EAR Project (BetaEAR) which includes the EJB project as well.

When deploying B and C on my appserver, I can see in the log / trace that each EJB contained in B is resolved and installed in EJBs container, with different JNDI names which, of course, have a "reference" to the EAR app which exposes them; for example I have ejblocal:AlfaEAR/AlfaEJB.jar/SameBean#test.view.SameBeanLocal and ejblocal:BetaEAR/AlfaEJB.jar/SameBean#test.view.SameBeanLocal

Now I'm wondering what happens in EJB container: the same ejb SameBean is treated as two distinct entities ? What happens if I change SameBean and its interfaces and I update only one of the projects, lets say AlfaEAR ? What about if SampleBean is declared as singleton ?

Can anyone help me to understand ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sharing same EJB 3.1 project in two (or more) EAR projects.
 
Similar Threads
Hi
question about missing EJB module in weblogic workshop EAR?
Newbie Eclipse Question: Whats the difference between Manifest and Build Path?
j2ee project dependency and project reference
Weblogic local ejb reference scope ambiguity