adrian, after some diagnostics (error occurs in both IBM 1.4.1 and Sun 1.4.2_03) and
some additional debug statements, it looks like the exception is occuring when I ask
for an QueueConnection, here's the latest log:
12:04:05,956 INFO [STDOUT] CSMessageEJB got TextMessage: Y10111
12:04:05,956 INFO [STDOUT] MessageHelper generated a JMSException:
12:04:05,956 INFO [STDOUT] Cannot authenticate user; - nested throwable:
(java.net.BindException: Address already in use: connect)
12:04:05,956 ERROR [STDERR] org.jboss.mq.SpyJMSException: Cannot authenticate user; -
nested throwable: (java.net.BindException: Add
ress already in use: connect)
12:04:05,956 ERROR [STDERR] at
org.jboss.mq.Connection.authenticate(Connection.java:883)
12:04:05,956 ERROR [STDERR] at org.jboss.mq.Connection.(Connection.java:238)
12:04:05,956 ERROR [STDERR] at org.jboss.mq.Connection.(Connection.java:315)
12:04:05,956 ERROR [STDERR] at org.jboss.mq.SpyConnection.(SpyConnection.java:60)
12:04:05,956 ERROR [STDERR] at
org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
12:04:05,956 ERROR [STDERR] at
helloworld.messagebeanserver.MessageHelper.sendMessage(MessageHelper.java:48)
12:04:05,956 INFO [STDOUT] CSMessageEJB got TextMessage: Y10110
12:04:05,956 INFO [STDOUT] CSMessageEJB got TextMessage: Y10108
12:04:05,956 ERROR [STDERR] at
helloworld.messagebeanserver.TREMessageEJB.onMessage(TREMessageEJB.java:97)
12:04:05,956 ERROR [STDERR] at
sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
12:04:05,956 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12:04:05,956 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324)
12:04:05,956 ERROR [STDERR] at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:460)
Which corresponds to this line of code:
queueConnection = ref.createQueueConnection();
In this context:
public void sendMessage(TextMessage msg, String queueName) {
Context jndiContext = null;
QueueConnection queueConnection = null;
QueueConnectionFactory ref = null;
Queue queue = null;
try {
jndiContext = new InitialContext();
ref =
(QueueConnectionFactory)jndiContext.lookup("ConnectionFactory");
queue = (Queue)jndiContext.lookup(queueName);
} catch (NamingException e) {
System.out.println("MessageHelper generated a NamingException:
");
System.out.println(e.getMessage());
e.printStackTrace();
}
try {
queueConnection = ref.createQueueConnection();
QueueSession queueSession =
queueConnection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender(queue);
queueSender.send(msg);
//queueSender.close();
//queueSession.close();
queueConnection.close();
queueConnection = null;
// jndiContext.close();
}
catch (JMSException e) {
System.out.println("MessageHelper generated a JMSException: ");
System.out.println(e.getMessage());
e.printStackTrace();
} finally {
try {
if(queueConnection != null) {
System.out.println("MessageHelper - Connection
not closed, reclosing connection");
queueConnection.close();
queueConnection = null;
}
} catch (JMSException e) {
System.out.println("MessageHelper generated a
JMSException: ");
System.out.println(e.getMessage());
e.printStackTrace();
}
}
}
Am I possibly requesting too many connections (my app does nothing but pass messages
around) to the queue? Is there any way for me to tune how many MessageDrivenBean
instances get created for each MessageDrivenBean?
Thanks!
<a
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3824938#3824938">View
the original post</a>
<a
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3824938>Reply
to the post</a>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user