Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Loopup JMS resource in Sun One Application Server  RSS feed

 
Solo Chiang
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having problem to lookup JMS factory and resource from a stand-alone Java application.
Executing the following code will throw NameNotFoundException,

jndiContext = new InitialContext();
connectionFactory = (ConnectionFactory) jndiContext.lookup(
"jms/myQueue");

I know I have to set some System property like JMS provider URL ... etc,
and I like to set those properties and content in the Java Class instead of an other property file,

Would someone tell me how to do that?
I am very frustrated on Sun J2EE 1.4 tutorial's instruction that they have very limited information on this, not sure if they want to teach you or just get you confused....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!