users@glassfish.java.net

Re: remote EJB best practices

From: <glassfish_at_javadesktop.org>
Date: Wed, 05 Mar 2008 13:52:56 PST

> 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 have found, tho, that if you're sending large collections of objects (like a List of a several thousand non-trivial objects), that Remote EJBs can be memory intensive and, in fact, slower than Web Services. (It was for the one specific instance I was playing with.)

Also, Remote Beans won't enjoy the lazy loading abilities that the JPA provides to local instances. It's probably not a big deal, obviously it depends on your application, but it's something to be aware of.
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=262520