Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Limit of 100 producers would be exceeded

843830Feb 19 2009 — edited Jul 7 2009
Hi,

I've created a client program that publishes objectMessages to queues, and after 100 times, I keep on getting the following message:
WARNING: com.sun.messaging.jms.JMSException: [ADD_PRODUCER_REPLY(19)] [C4036]: A broker error occurred. :[409] [B4183]: Producer can not be added to destination inputQueue [Queue], limit of 100 producers would be exceeded
I'm using Glassfish V2, Open MQ jms and sun-jms-adapter. I've seen in some sun docs, that I can perfectly change the maxNumberOfProducer in using admin commando lines, but I could not find anywhere what does this number mean. If it meant to be the maximum number of ACTIVE producers, something is strange because I dont have this number of producers trying to produce messages simoutaneously. Besides, I'm closing my session, my producer and my connection every time I send a new message.

On the other hand, if this number meant to be the maximum number of times I can produce messages to a queue, then it doesn't make any sense at all... Why would I want that?

Can anybody please help me? Here is the pice of code where I create a producer and send a message to my queue:
                QueueSession queueSession = null;
		ObjectMessage message = null;
		Queue queue = null;
		QueueSender queueSender = null;
		QueueConnection connection = null;
		
		try {
			
			connection = queueConnectionFactory.createQueueConnection();
			
			queueSession = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

			// Create an object message
			message = queueSession.createObjectMessage(object);
			
			queue = (QueueConnectionFactory) InitialContext
													.doLookup(destination);

			// create producer
			queueSender = queueSession.createSender(queue);
			
			queueSender.send(message);


		} catch (Exception e) {
			logger.severe("error while sending message: " + e.getMessage());

		} finally {
			
			try {
				
				if (queueSender != null) {
					queueSender.close();
				}
				
				if (queueSession != null) {
					queueSession.close();
				}
				
				if (connection != null) {
					connection.close();
				}
			} catch (JMSException ex) {
				logger.severe("Could not close resources. " + ex.getMessage());
			}
			
			queueSession = null;
			message = null;
			destination = null;
			queueSender = null;
			queue = null;
			connection = null;
		}
Thnak you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2009
Added on Feb 19 2009
3 comments
763 views