Accessing an EJB on a different server with @EJB or @Resource annotation

Hi.

 

I have EJBs deployed on a Glassfish server and I have a Servlet accessing them from another server (which is also a Glassfish server). Of course it's possible to look it by using JNDI lookup, but is there a way to look it up by using an annotation? So far I haven't found an example for this.

 

Thanks,

 

Amir

Developer