users@glassfish.java.net

Re: remote EJB best practices

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Wed, 05 Mar 2008 16:06:49 -0600

glassfish_at_javadesktop.org wrote:
>> The only thing that concerns me is whether having the remote
>> interfaces in place (we weren't planning that for now) will slow
>> the web app down?
>
> Recall that Remote EJBs are simply an option as well as Local EJBs.
>
> If you web tier is colocated with the app tier in the same EAR (and
> on the same server, obviously), then your web tier can enjoy the
> local calling semantics with Local beans while you Swing client will
> use the Remote interfaces. Neither will affect the other.

I noticed that when I asked NetBeans to generate session beans for my
entity classes that he gave a warning about local and remote interfaces
having the same names (even though he generated them that way). What's
best practice on that? Do I have local and remote interfaces with
different names, e.g. create() and createRemote() and have them both
delegate to the same method in the implementing class? Is the warning
because GlassFish might not know whether to call the local or either the
remote interface?

P.S. I have it working across machines now, as well.

-- 
____________________________________________________________
Glenn Holmer                          gholmer_at_weycogroup.com
Software Engineer                        phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601