@Stateless, @Remote and @Local
- by Jeff Foster
In my deployment on JBoss 5.1.0GA with JavaEE-5 I have beans of the general form
public interface Foo {
void baz ();
}
@Stateless
public class FooBean implements Foo {
void baz() { // ...
}
}
I have assumed that this is the same as if I have explicitly annotated the Foo interface with @Local. From seeing a stack trace in the code I think that it is actually using a remote interface, whereas I want all of my beans to be local.
Do I need to explicitly annotate interfaces as Local or is there some default? Finding documentation on this is proving challenging so any links to relevant documentation would be greatly appreciated.