If we declare a Bean class to use both @Remote and @Local the intra-JVM calss
server calls are made using the remote interface if using @EJB in another SLSB.
Why?
public interface FooApi {
String hello(String name);
}
@Remote(FooApi .class)
@Local(FooApi .class)
@Stateless
public class FooApiBean implements FooApi {
public String hello(String name) {
return "hello " + name;
}
}
public interface BarApi {
String hello(String name);
}
@Remote(BarApi .class)
@Stateless
public class BarApiBean implements BarApi {
@EJB FooApi foo; <--------- remote proxy is used here, why???
public String hello(String name) {
return foo.hello(name);
}
}
Thanks,
Stefan
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973516#3973516
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973516
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user