views:

242

answers:

3

Hello all,

I am testing WebLogic 10.3.1 JMS, but there has a problem.

My Testing step:

  1. Start WebLogic Server
  2. Start JMS Client
  3. Client send a object to WebLogic JMS and server received the object.
  4. Stop WebLogic Server
  5. Send another object to WebLogic JMS.

What I expect is a exception come out, but there have not anything appear and program hanged. Program stopped at:

sender.send(objMsg);

I have add some timeout settings, but still not working:

((WLProducerImpl) sender).setSendTimeout(1000);
((WLConnection) connection).setReconnectPolicy(JMSConstants.RECONNECT_POLICY_PRODUCER);
((WLConnection) connection).setReconnectBlockingMillis(1000);

Is there any way to produce exception in this case? Thank You Very Much.

Best Regards, Chris

A: 

You can try putting timeout in send method. something similar to following: sender.send(objMsg, Message.DEFAULT_DELIVERY_MODE, Message.DEFAULT_PRIORITY, 10000);

vivyzer
A: 

I suspect the WebLogic transport is hung and hasn't detected the server has gone - and the send is blocked in the transport. Unless WebLogic JMS are using a separate thread internally, there's no a timeout will help.

IMHO, WebLogic support are the only guys who'll be able to help you on this one (looks like a bug).

Rob Davies
A: 

Solution Found:

Please add these 2 parameters:

-Dsun.net.client.defaultConnectTimeout=30000
-Dsun.net.client.defaultReadTimeout=30000
chris13work