Which version of JBoss do you use? I tested this on my local JBoss-4.2.2 setup with an sample application:
| @Stateless | @Remote ({UserManager.class}) | @RemoteBinding (jndiBinding = "RemoteUserManagerBean") | @Resources( { | @Resource(type = Queue.class, name = "jms/A", mappedName = "queue/A") | }) | | public class UserManagerBean implements UserManager { | | /** | * Instance of logger | */ | private static Logger logger = Logger.getLogger(UserManagerBean.class); | | @PersistenceContext | private EntityManager entityManager; | | @Resource | private SessionContext sessionContext; | | /** | * @see org.myapp.ejb.UserManager#getUser(long) | */ | public User getUser(long id) { | System.out.println("Entity manager is " + entityManager); | return null; | } | | /** | * @see org.myapp.ejb.UserManager#getUsers(java.lang.String) | */ | public List<User> getUsers(String name) { | Object obj = sessionContext.lookup("jms/A"); | System.out.println("Looked up through session context = " + obj); | try { | Context ctx = new InitialContext(); | Object obj1 = ctx.lookup("java:comp/env/jms/A"); | System.out.println("Looked up java:comp/env/jms/A = " + obj1); | } catch (Exception e) { | e.printStackTrace(); | } | //blah blah blah | } | | Both the lookups (through sessionContext and InitialContext) return me the queue object. Can you post your code and also the entire exception stacktrace that you are seeing? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129435#4129435 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129435 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user