[jboss-user] [EJB 3.0] - Re: @EJB injection always injects remote object, why not loc
jainsau
do-not-reply at jboss.com
Thu Aug 2 08:24:21 EDT 2007
Heres my code:
inteface (business interface) is unannotated:
public interface OrderService {...}
my slsb is annotated as follows:
@Stateless
@Local
@Remote
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class OrderServiceBean implements OrderService {...}
Now, in another SLSB (which is annotated just like above), i am accessing the above bean through injection:
public class DemographicsServiceBean implements DemographicsService{
@EJB (name = "earName/OrderServiceBean/local")
private OrderService orderService;
<!-- OR -->
@EJB
private OrderService orderService2;
.....
}
I am just testing this out, so I have a single system, and all the beans are deployed in this system. So the bean has to be available locally also. But still I get only the remote proxy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070076#4070076
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070076
More information about the jboss-user
mailing list