-
1. Re: JMS Remote Client
adrian.brock Jun 24, 2003 7:26 AM (in response to pep)Post the code and changes you made to the config.
Regards,
Adrian -
2. Re: JMS Remote Client
adrian.brock Jun 24, 2003 7:27 AM (in response to pep)Actually:
> java.net.ConnectException: Connection refused: connect
It cannot make a socket connection to the server.
Regards,
Adrian -
3. Re: JMS Remote Client
arabin Oct 20, 2003 4:17 PM (in response to pep)I have the same problem with this code:
public class PerformanceTesterSender implements Runnable
{
static InitialContext iniCtx = null;
static QueueConnectionFactory qfact = null;
//static QueueConnection qconn = null;
String msg;
//static CountDown done = new CountDown(1);
public PerformanceTesterSender (String msg)
{
this.msg = msg;
}
public void run()
{
try
{
//Logging.debugInfoLog("Sending " + msg);
sendRecvAsync(msg);
}
catch (Throwable ex)
{
synchronized (this)
{
//Logging.debugInfoLog(msg);
ex.printStackTrace();
}
}
}
public void sendRecvAsync(String text)
throws JMSException, NamingException
{
QueueSession session = null;
Queue que = null;
//Logging.debugInfoLog("Begin sendRecvAsync");
// Setup the PTP connection, session
synchronized (this)
{
if (iniCtx == null)
iniCtx = new InitialContext();
}
que = (Queue) iniCtx.lookup("queue/testQueue");
QueueConnection qconn = qfact.createQueueConnection();
session = qconn.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
qconn.start();
// Set the async listener
QueueReceiver recv = session.createReceiver(que);
//recv.setMessageListener(new ExListener());
// Send a text msg
QueueSender send = session.createSender(que);
TextMessage tm = session.createTextMessage(text);
send.send(tm);
//Logging.debugInfoLog("sendRecvAsync, sent text="
// + tm.getText());
send.close();
//Logging.debugInfoLog("End sendRecvAsync");
qconn.stop();
session.close();
qconn.close();
}
public static void main(String args[]) throws Exception
{
iniCtx = new InitialContext();
qfact = (QueueConnectionFactory) iniCtx.lookup("QueueConnectionFactory");
//qconn = qfact.createQueueConnection();
for (int ii=0; ii< 300; ii++)
{
String msg = "Text Message " + ii + " " + ServiceTimer.getFormattedTime();
//Logging.debugInfoLog("Sending " + msg);
PerformanceTesterSender client = new PerformanceTesterSender(msg);
Thread thr = new Thread (new PerformanceTesterSender(msg));
thr.start();
}
//Logging.debugInfoLog("Stop");
//client.done.acquire();
//done.acquire();
//System.exit(0);
}
}
The first 287 iterations are fine. On iteration 288 I have this exception. -
4. Re: JMS Remote Client
stephanenicoll Oct 23, 2003 12:56 AM (in response to pep)JMS Connections are not closed somehow. Have you checked what was happening at the client side. This might help.
Regards,
Stephane -
5. Re: JMS Remote Client
alwyn Oct 29, 2003 7:34 AM (in response to pep)I get the same exception to a remote server, but local works.
However it doesn't appear to be the problem where the server tries to connect back to client 0n 127.0.0.1 as tcpdump on lo shows nothing.