This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Unable to run JMS client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Unable to run JMS client" Watch "Unable to run JMS client" New topic
Author

Unable to run JMS client

faisal khan
Ranch Hand

Joined: Mar 13, 2002
Posts: 47
Trying to run simple JMS client to send messages and get Messages.
but there is exception given below,
Exception: org.jboss.mq.SpyJMSException: Cannot authenticate user
Code:
public QSender ("ConnectionFactory","queue/testQueue") {
try {
qFactory = (QueueConnectionFactory)context.lookup (factory);
qConnection = qFactory.createQueueConnection();
qSession = qConnection.createQueueSession (false,Session.AUTO_ACKNOWLEDGE);
queue = (Queue) context.lookup (destination);
qSender = qSession.createSender (queue);
public void sendMessage(String message) {
try {
TextMessage tm = qSession.createTextMessage (message);
qSender.send (tm);
}catch(JMSException jmse) {
System.out.println("Error in sendMessage() \n"+jmse);
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to run JMS client
 
Similar Threads
Communicating with JMS queue in Different Domain on same machine
ejb Stateless SessionBean send JMS msg's
Weblogic 10.3.2 queue connection factory and queue creation
weblogic 10 + JMS
how to receive message from a queue