users@glassfish.java.net

Re: Injection into WebStart Client not working?

From: Markus KARG <markus.karg_at_gmx.net>
Date: Mon, 24 Mar 2008 17:22:43 +0100

Ken,

well, actually neither 3.2.1 nor 3.2.2 say that both interfaces are
mandatory. Moreover, both are optional as I understand these chapters
and as you explained in your last email. So still I did not find
anything in the spec that says that the remote interface has to be
explicitely defined and will not be created automatically behind the
scenes, or that it would be not allowed to just mark the class itself as
@Remote (to tell GlassFish that this bean class implicitely defines its
own interface as beeing the remote interface). 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?) !

Also 3.4.1 says:

"In both cases, the syntax used in obtaining the reference to the Cart
business interface is independent
of whether the business interface is local or remote."

So, why do I have to *explicitely* specify the remote interface in MY
client, while the spec does not use any interface at all but just
references the bean itself?

THAT is what I do not understand. All samples I see are using the bean
class in the client code and never define any interface. This is what
makes me confused. Even more, on the web I saw several samples that just
marked the bean class itself as @Remote. Why isn't that possible?

Thanks
Markus

glassfish_at_javadesktop.org schrieb:
>> Can you please point me to the chapter of the EJB 3.0
>> spec where it is
>> told that both interfaces are mandatory? I just did
>> not find it, but
>> maybe I am blind. Thanks. :-)
>>
>
> 3.2.1 and 3.2.2. Just to be clear, the Local interface is required if you're exposing a Local view. Same for the Remote case. It's up to the developer whether to expose a Local view, a Remote view, or both.
>
>
>
>> Also, I did not define the local interface in my
>> sample but it still
>> works very well on GlassFish, and the verifier did
>> not even tell me that
>> the remote one was missing. So is the verifier buggy?
>>
>
> The spec doesn't actually mandate anywhere that the bean has to expose at least one view. Of course the bean isn't very useful if it doesn't. Not technically a bug although I suppose the verifier could add a warning in this case.
>
> --ken
> [Message sent by forum member 'ksak' (ksak)]
>
> http://forums.java.net/jive/thread.jspa?messageID=265474
>
> ---------------------------------------------------------------------
> 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