aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Is it possible to call Local Interfaces in same mechine if 2 containers is there 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 "Is it possible to call Local Interfaces in same mechine if 2 containers is there " Watch "Is it possible to call Local Interfaces in same mechine if 2 containers is there " New topic
Author

Is it possible to call Local Interfaces in same mechine if 2 containers is there

Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
Hi,
1. Is it possible to call Local Interfaces in same mechine if 2 containers is tehre in that meching.
2. When ever you will call ejbFinder methods ,if in database no data ,what will happen?

Plz give the reply who ever you knows.

Mohan

[ December 13, 2004: Message edited by: sunita mohan ]
[ December 13, 2004: Message edited by: sunita mohan ]

Thank you,<br />Sanju
Grand Puba
Greenhorn

Joined: Oct 28, 2004
Posts: 11
Mohan,

You will need to use a remote interface when the client that will be working with it will be in a different Java Virtual Machine (distributed environment).
Local client view can only be accessed by beans who are packaged within the same EJB-JAR package or by beans who are packaged within different EJB-JAR packages (or WAR packages), but everything is still packaged within the same application's EAR package.

So, I don't think it is possible to call local interfaces since each container will have it's own VM.

Greetz,

Puba

Note: If you create an entity bean, you need to remember that it's usually used with a local client view. If your entity bean needs to provide access to a client outside of the existing JVM (i.e., a remote client), you typically use a session bean with a remote client view. (Session Facade pattern)


"You don't need eyes to see, you need vision" -- Faithless
Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Originally posted by sunita mohan:
Hi,
1. Is it possible to call Local Interfaces in same mechine if 2 containers is tehre in that meching.
2. When ever you will call ejbFinder methods ,if in database no data ,what will happen?

Plz give the reply who ever you knows.

Mohan

[ December 13, 2004: Message edited by: sunita mohan ]

[ December 13, 2004: Message edited by: sunita mohan ]


Hi Mohan,

Reg your Question 1, I agree with Puba that you have to use the remote interface as both containers may use different jvm's.

Reg Q2) ObjectNotFoundException will be thrown.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it possible to call Local Interfaces in same mechine if 2 containers is there
 
Similar Threads
Is the Oracle Thin driver implementing these 2 interfaces currently?
Remote v Local
Just cleared SCJP
A Mock exam question from SOFT-SCBCD
Dowloading a Table as a csv File