Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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

Doubts regarding JMS in Jboss

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) my code if i use QueueConnectionFactory then i got QueueConnectionFactory not bound exception then i replaced with ConnectionFactory;what's the difference between these two.

QueueConnectionFactory conFactory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");

QueueConnectionFactory conFactory = (QueueConnectionFactory) ctx.lookup("QueueConnectionFactory");

2)what is difference between if i specify this in ejb-jar.xml;if i write javax.jms.Topic it didnt worked;

<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
and

<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type
</message-driven-destination>



3)

do i need to set up environment properties in client ;if i dont write this i am getting Received time out error.

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES,"org.jboss.naming rg.jnp.interfaces");
env.put(Context.PROVIDER_URL,"jnp://localhost:1099");


Context ctx = new InitialContext(env);

// Lookup a JMS connection factory
QueueConnectionFactory conFactory = (QueueConnectionFactory) ctx.lookup(CONNECTION_FACTORY);


4) i heard that when you want to work some operation thru offline then you should use JMS.what is offline??

5)

i know its queque name described in jbossmq-destinations-service.xml;whats the purpose of creating queue???

i think it just send messages to the MyQueue;

<destination-jndi-name>queue/MyQueue</destination-jndi-name>
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1) my code if i use QueueConnectionFactory then i got QueueConnectionFactory not bound exception then i replaced with ConnectionFactory;what's the difference between these two.



If lookup has to been successful the ConnectionFactory object has to be bound by the name you lookup.
reply
    Bookmark Topic Watch Topic
  • New Topic