Forums Register Login

local interfaces on EJB Components

+Pie Number of slices to send: Send
Kathy:
can you explain in more detail about local interfaces and do we need again a corresponding local home interface to create/lookup the local interface??
thanks
+Pie Number of slices to send: Send
I think u might want to do some tutorial from Oracle Site... I have once tried that tutorial... That's really cool...
http://otn.oracle.com/sample_code/tutorials/fbs10g/litf/toc.htm
+Pie Number of slices to send: Send
I always wondered why do we have 2 interfaces.
I understand the benefit of local interfaces, to bypass RMI and increase performance. Why does the developer take the burden of developing another interface for the bean to be used locally. At the time of deployment, let the deployer tool generate all the neccesarry classes for both local and remote use. Can the Vendor not identify the bean(if the bean is deployed locally or not) and use the corresponding classes. Can't the Vendor's container be smart
[ October 29, 2003: Message edited by: Vish Kumar ]
+Pie Number of slices to send: Send
naing,
my question is..since local interface is on the same process as the EJB Component, we can always get a reference to that..right. Then , why again going through local home interface and use create/lookup for getting the reference, just why cant we use "new" and get the reference??
+Pie Number of slices to send: Send
 

Originally posted by Vish Kumar:
I always wondered why do we have 2 interfaces.


Here is the link, which discuss about the reason why there are two interfaces existing in EJB...
http://forum.java.sun.com/thread.jsp?thread=453842&forum=13&message=2068300
Hope it helps you something...
+Pie Number of slices to send: Send
Hi
Local interfaces are typically used while using the entity beans .In a typical scenario one would like to make a request to a stateless session bean which in turn would like to aggregate a whole bunch for entity beans .The entity beans in order to implement the Aggregate patterm would make use of local home interfaces and gives the data required to the stateless bean .This is typically known as Session Facade pattern.
Typically you wont be doing a look up using local home interface as they would be bundled in the samee ejb-jar.xml
Rishi
SCJP,SCWCD,IBM OOAD
+Pie Number of slices to send: Send
this may be other use of a local interface..but according to EJB 2.0 spec., you can call enterprise beans in a fast and efficient way by calling them through their local object rather than by EJB objects and local objects implement "local interface" rather than remote interface...My question is again whats the use of "local home interface" here and is local home interface necessary?
+Pie Number of slices to send: Send
Use of interfaces makes it possible to switch over to remote interfaces in future.
+Pie Number of slices to send: Send
I didnt got exactly what that means pradeep. can you explain more precisely.
+Pie Number of slices to send: Send
IMO,What pradeep meant was,the use of interfaces enables location transparency of a bean.You can access a co-located Bean today using local interface.later,if the situation requires the bean to be deployed in a remote location,you still can use its services by accessing it via remote interface.Isnt it pradeep?
+Pie Number of slices to send: Send
Hi,
I think what Siva and Pradeep pointed out earlier was fair enough, one would like to expose both the local and remote interfaces and depending upon where it is deployed , either of two can be made use of.
Rishi
SCJP,SCWCD,IBM OOAD
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 923 times.
Similar Threads
problem calling EJB by local interfaces
Cannot create Local Session Bean in JBoss 4.0.3 ?
Local interface and local home interface
EJB call
Implementing Remote and local interface at the same time ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:27:27.