• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

does JBoss ship with a predefined TopicConnectionFactory?

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I am on JBoss and trying to access a very simple message-driven bean from a client. (I have taken the code from an example that is supposed to run on Sun reference implementation).

The bean deployment seems to be ok (no errors).

I have a problem with the client code, the jndi cannot lookup "jms/TopicConnectionFactory". I am not sure if JBoss comes with predefined TopicConnectionFactory (I do know that it comes with predefined Topic and Queue: "topic/testTopic" and "queue/testQueue").

So what do I do? Is there a predefined TopicConnectionFactory in JBoss?

If not, in what xml configuration file do I add a TopicConnectionFactory to JBoss?

Here is the client code:

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it does. Have a look at the example in Section 6.1.2 at JMS on JBoss.

Also, i see that in your code you are using:


env.put("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
env.put("java.naming.provider.url", "iiop://localhost:3700");
InitialContext ctxt = new InitialContext(env);



You will have to change these values appropriately for JBoss specific values.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes! Thank you!

It is working now!

Just for other people who will read this:

The jndi name for the default ConnectionFactory on JBoss is:



And the JBoss environment properties are:

 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic