• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connection to JMS from J2EE-Client

 
Per Lovdinger
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Environment:
J2EE 1.3
WebSphere Studio Application Developer (Windows)
Version: 5.1.1
===================================================================
Title: Connection to JMS from J2EE-Client
===================================================================
Hi there,
Have a couple of questions:
1: In my deployment descriptor for the j2ee-client,since I want to make a call to
JMS, I need to create references to QueueConnectionFactory and Queue.
How should I declare them as resource-references or resource-environment-references ?

2: I tried to declare them as resource-references, but I'm not sure how I do a
proper lockup.
When I do a lockup I get a reference to a "Reference-object" which I can't cast to a Queue for example.
How do I get a handle to the Queue and QueueConnectionFactory ?
*** My lockup locks like this:
String jndiQueue = "java:comp/env/jms/myOeeQueue";
Object obj = ctx.lookup(jndiQueue);
Is there a better way to do a lockup from the client ?
regards
Per
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this article by Roland Barcia. Alternatively, I also cover this in depth in my book.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!