[jboss-user] [Messaging, JMS & JBossMQ] - Re: import org.jboss.mq.server.jmx.Queue

milind.uc do-not-reply at jboss.com
Mon Mar 26 01:24:08 EDT 2007


Dear Victor,

Feel glade to see the way you reply and sorry as I am replying so late because sat. and sun. was holiday here...

Well as ur able to send message to queue and not able to recive.So there are 2 to 3 possiblity...

1)Might be u r usinng diffrent Queue(Queue Name) while creating the receiver .I mean  you need to used the same queue name at receiver end which you used at while creating the  queue sender.

2) At the time of creating the  Receiver you migth forget to do connection.start() (I mean you need to invoke the start method on the QueueConnection object above I writeen connection.start() in this connection is object of Queueconnection class)

3)It might happen that while creating object of initialcontext.. you need to set  the  property  like:---------------

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



Inseted of localhost might be ur using the difffrent ipadress in reciver side which u have used for the sender side(Provided that  you are creating the sender and receiver  in diffrent java files).So used the same IpAdress in sender and receiver side...


4)Might be  you are reciving the message twice in ur code  specially at the time of synchronus reciving and might at first time of receving ur not fetching and checking the contenet of message which might be ur doing at the second time so just  make look on ur code so try adopt the model of asynchronus......

5)And being it is the queue here  first user(Queue receiver) available on it (Queue)  will able to fetch the message so the next QueueReciver coming after the first QueueReceiver not get any messages from the queue because first QueueReceiver might be consuming the messages.....



Well this what I am felling..hope it will work for u....

Well I just came in the office still I havent used the code you send to me  but well I dont know lot of thing in JMS,JMX and all thses stuffs I want to do all thse things  I never know( I meas I never have the idea to read the mbeans  like it ) the code u written for me so could u tell mesome books or links  because I want to explore it lot.. And yes ,,  after trying your code example I might will get some query so please  help me that time....

Thanks :)



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031466#4031466

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031466



More information about the jboss-user mailing list