[jboss-user] [EJB/JBoss] - @Local AND @Remote?
stnor
do-not-reply at jboss.com
Fri Sep 22 04:14:16 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);
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973490#3973490
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973490
More information about the jboss-user
mailing list