[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: infinite loop when connecting to a stopped acceptor
jmesnil
do-not-reply at jboss.com
Fri Dec 12 09:22:55 EST 2008
I've isolated the problem: when there is no server to connect to, we have the infinite loop:
| public void testStartStop3() throws Exception
| {
| /***********************************/
| /* No JBM Server have been started */
| /***********************************/
|
| JBossConnectionFactory cf = new JBossConnectionFactory(new TransportConfiguration(NettyConnectorFactory.class.getName()),
| null,
| DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
| DEFAULT_PING_PERIOD,
| DEFAULT_CONNECTION_TTL,
| DEFAULT_CALL_TIMEOUT,
| null,
| DEFAULT_ACK_BATCH_SIZE,
| DEFAULT_ACK_BATCH_SIZE,
| DEFAULT_CONSUMER_WINDOW_SIZE,
| DEFAULT_CONSUMER_MAX_RATE,
| DEFAULT_SEND_WINDOW_SIZE,
| DEFAULT_PRODUCER_MAX_RATE,
| DEFAULT_MIN_LARGE_MESSAGE_SIZE,
| DEFAULT_BLOCK_ON_ACKNOWLEDGE,
| DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
| true,
| DEFAULT_AUTO_GROUP,
| DEFAULT_MAX_CONNECTIONS,
| DEFAULT_PRE_ACKNOWLEDGE,
| DEFAULT_RETRY_INTERVAL,
| DEFAULT_RETRY_INTERVAL_MULTIPLIER,
| DEFAULT_MAX_RETRIES_BEFORE_FAILOVER,
| DEFAULT_MAX_RETRIES_AFTER_FAILOVER);
| Connection connection = cf.createConnection();
| assertNotNull(connection);
|
| try
| {
| connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| fail("acceptor must not accept connections when stopped");
| }
| catch (Exception e)
| {
| }
| }
|
The code runs in an infinite loop in ConnectionManagerImpl.getConnectionForCreateSession: the failover() method returns true while there has been no failover.
I'm continuing the investigation
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196253#4196253
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196253
More information about the jboss-dev-forums
mailing list