[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EJB Local Interfaces



Hi John,

The way it was explained to me is that the strength of doing local 
interfaces is that the container can better optimize for beans that are 
local to the container and don't have to make the redundant call to get 
to a resource that is already in the container. Personally I've never 
understood why they went through all the hassle of doing it this way if 
this is the problem they were trying to solve as (at the time) many EJB 
containers were able to optimize for local and remote EJB instances and 
cluster and load balance appropriately. JBoss was doing this pretty 
early in life and I always assumed that WebLogic was as well, so it has 
always stumped me as to why the extra overhead of local interfaces was 
chosen by the architects of J2EE. On asking one Sun engineer I was told 
that semantics dictated that there had to be another interface - that a 
remote interface shouldn't pertain to local objects - but that just 
didn't make any sense to me... and still doesn't.

On Monday, June 23, 2003, at 10:45  AM, John Camerin wrote:

> Hi all,
> I wanted to ask if anyone has done anything using local interfaces on 
> EJBs.
> My questions/curiosities surround the advantages of implementing local
> interfaces for our EJBs.  We run JBoss in production and therefore EJB 
> calls
> through the remote interface do not serialize and deserialize when the
> caller and callee are in the same JVM.  I understand the concepts of 
> having
> fine-grained methods available in a local interface and course-grained 
> in
> remote interfaces, but I am looking for more as there are other
> considerations being taken currently to remove fine-grained methods 
> from the
> EJB remote interfaces.  Also of importance, the EJBs I am looking at 
> this
> for are Stateless session beans.
>
> Thanks
>
> John
>