users@glassfish.java.net

Re: problem accessing remote ejb and a strange fact

From: <glassfish_at_javadesktop.org>
Date: Fri, 22 Jun 2007 09:22:41 PDT

>
> "Classes that define an EJB using a
> component defining annotation
> (@Stateless,_at_Stateful,_at_MessageDriven) can only be
> packaged
> in an ejb-jar."
>
> can you tell me why I had no problem using remote
> interface (bean class was in the .war too)?

The ejb component-defining annotations have a lot of semantics associated
with them. It's the mere existence of a .class with such an annotation that
defines an EJB component in Java EE 5. In addition, it has always been the
case that in EJB the client of a session bean never directly manipulates the
bean class itself. It's the interface that serves as the contract between client
and bean. For these reasons, while the interface can appear outside of the
ejb-jar, the bean class itself does not.

>
> ps: I promised
>
> for(int i = 0; i < 100; i++) {
> System.out.println("I'm stupid");

for(int = 0; i < 100; i++) {
       System.out.println("Not stupid! Asking great questions and becoming a Java EE expert :-) " );
[Message sent by forum member 'ksak' (ksak)]

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