users@glassfish.java.net

Re: _at_Local extends _at_Remote

From: Sahoo <sahoo_at_sun.com>
Date: Mon, 15 Sep 2008 18:16:11 +0530

Yes, that's a correct warning. Remote methods and local methods have
very different invocation semantics (e.g., pass-by-value vs.
pass-by-reference) and sharing them is a bad practice. Imagine, the
method implementation assumes pass-by-reference semantics and hence
modifies the argument only to realize that the changes to argument are
not visible for remote calls.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I tried the 2nd approach, with a "helping" interface where both Local and Remote interface extend from.
> But NetBeans gives a warning on
> @Stateless(mappedName="FooEJB")
> public class FooBean implements FooLocal, FooRemote {
> ...
> }
> saying
> "When a session bean has remote as well as local business interface, there should not be any method common to both the interfaces"
>
> Although this warning the deployed project behaves like expected when accessing both Local and Remote interfaces.
>
> Anyone with some more expertise/experience on this topic?
>
> Thanks
>
> Kris
> [Message sent by forum member 'moenzie' (moenzie)]
>
> http://forums.java.net/jive/thread.jspa?messageID=299339
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>