users@glassfish.java.net

Re: Injection into WebStart Client not working?

From: Markus KARG <markus.karg_at_gmx.net>
Date: Tue, 25 Mar 2008 18:34:11 +0100

Thank you so much, NOW I understand how to use @Remote. :-)

Just to complete this discussion, can you point me to the chapter of the
spec explaining this issue? I mean, I completely understand what you
wrote, I just wonder why I didn't find this in the spec when reading it.

Thanks
Markus

glassfish_at_javadesktop.org schrieb:
>> @Remote (to tell GlassFish that this bean class
>> implicitely defines its
>> own interface as beeing the remote interface).
>>
>
> The confusion is that there are many ways the @Remote/_at_Local annotations can be applied. In all cases there is still an interface that is distinct from the bean class. Typically when @Remote or @Local is specified on the bean class, its value attribute is specified to be the name of the interface.
>
> @Remote(Cart.class)
> @Stateless
> public class CartBean { ... }
>
> Technically, @Remote or @Local can be specified with no value on the bean class. This is rarely used but it's just a shorthand to say that the one interface in the implements clause should be considered either @Remote or @Local.
>
> // One remote business interface : Cart
> @Remote
> @Stateless
> public class CartBean implements Cart { ... }
>
> // One local business interface : Cart
> @Local
> @Stateless
> public class CartBean implements Cart { ... }
>
>
>> Moreover, 3.4.1 gives an
>> example of a client:
>>
>> @EJB Cart cart;
>>
>> ...and no remote interface is referenced there... (or
>> is "Cart" a remote
>> interface?) !
>>
>
> Yes, Cart is an interface but it's ambiguous from the code snippet whether it's a local or remote business interface.
> [Message sent by forum member 'ksak' (ksak)]
>
> http://forums.java.net/jive/thread.jspa?messageID=265521
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>


-- 
http://www.xing.com/go/invita/58469