[jboss-user] [EJB 3.0] - SLSB with @Local and @Remote gets Remote Proxy in @EJB injec
stnor
do-not-reply at jboss.com
Fri Sep 22 06:24:12 EDT 2006
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
More information about the jboss-user
mailing list