ejb@glassfish.java.net

Local or Remote interface ?

From: Antonio Goncalves <antonio.mailing_at_gmail.com>
Date: Tue, 26 Sep 2006 11:56:23 +0200

Hi,

I have a full JEE application with EJBs talking to EJBs, JSF Managed Bean
talking to EJBs and a Swing application talking to EJBs. I've been only
using Remote interface and everything works fine.

I want to improve my modeling so I thought let's create a Local interface
for EJB to EJB calls. Brillant. And after I thought would Local interface
work with JSF Managed Bean. And yes it does. So now I think that the only
use of the Remote interface is with my Swing application... is that right ?
If I was using an external web container I would have to use Remote
interface but is it because of the way Glassfish bundles everything that I
can use Local interface between JSF and EJBs ?

To resume, what should be the way to use Local & Remote interface ?

EJB to EJB : Local
JSF to EJB : Local
Swing to EJB : Remote



Thanks,

Antonio