ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ PUB SUB : WAS 6.0 : JMS ISSUE ::: urgent help plss

Post new topic  Reply to topic
 MQ PUB SUB : WAS 6.0 : JMS ISSUE ::: urgent help plss « View previous topic :: View next topic » 
Author Message
In_love_with_MQ
PostPosted: Fri Mar 17, 2006 8:22 am    Post subject: MQ PUB SUB : WAS 6.0 : JMS ISSUE ::: urgent help plss Reply with quote

Acolyte

Joined: 10 Jul 2005
Posts: 70

Hi ,

I am using MQ 6.0 broker on AIX and my jms code is on WAS 6.0


My code is as follows :
import java.io.IOException;
import javax.jms.JMSException;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.jms.*;
public class dsub extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
try {
Context jndiContext = new InitialContext();
TopicConnectionFactory tcf =
(TopicConnectionFactory) jndiContext.lookup( "Tconn" );
TopicConnection tConn = tcf.createTopicConnection();
tConn.start();
TopicSession tSess = tConn.createTopicSession(
false, Session.AUTO_ACKNOWLEDGE );
Topic t = (Topic)jndiContext.lookup( "Tpic" );
TopicPublisher tPub = null;
TopicSubscriber tSub = null;
TextMessage msg = null;
tSub = tSess.createSubscriber(t);
tPub = tSess.createPublisher(t);
String payload = "test";
msg.setText(payload);
tPub.publish(msg);
tPub.close();
tSub.close();
tSess.close();
tConn.close();
}
catch (NamingException e)
{
System.out.println("Could not create JNDI API context: " + e.toString());
}

catch (Exception e)
{
System.out.println("Exception e " + e.toString());
}

}
}


I have defined the WAS MQ Configuration of TOPIC and topic conn factory


But when i run my code i get error :

[3/17/06 14:14:50:795 GMT] 0000003e ConnectionEve A J2CA0056I: The Connection
Manager received a fatal connection error from the Resource Adaptor for resource
Tconn. The exception which was received is javax.jms.JMSException: MQJMS1111:
JMS1.1 The required Queues/Publish Subscribe services are not set up {0}
[3/17/06 14:14:51:350 GMT] 0000003e SystemOut O Exception e javax.jms.JMSEx
ception: MQJMS1111: JMS1.1 The required Queues/Publish Subscribe services are no
t set up {0}


Why is it saying service not started or queue not found . I have started the Broker and defined all queues ?

On topic connection factory setting there is a place to set what type of broker is used ...advanced or basic .

MQ6.0 has inbuilt MA0C ...so i have selected basic . is it fine ???

plss throw some light ...
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Mar 17, 2006 3:37 pm    Post subject: Re: MQ PUB SUB : WAS 6.0 : JMS ISSUE ::: urgent help plss Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

In_love_with_MQ wrote:
I have started the Broker and defined all queues ?


Don't ask us.

Did you start the broker and define all the necessary queues? How do you know?

Did you create a correct TopicConnectionFactory under the right name in WAS?

Did the WAS startup indicate that it bound the name for the TCF correctly?

Did the WAS startup indicate any other errors?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ PUB SUB : WAS 6.0 : JMS ISSUE ::: urgent help plss
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.