activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Abramov (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1594) Closing an ActiveMQ connection causes 1.5 JVM to crash
Date Fri, 22 Feb 2008 16:30:14 GMT
Closing an ActiveMQ connection causes 1.5 JVM to crash
------------------------------------------------------

                 Key: AMQ-1594
                 URL: https://issues.apache.org/activemq/browse/AMQ-1594
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.0.0, 4.1.1, 5.1.0
         Environment: Linux (see attached file for more specs)
            Reporter: Denis Abramov
            Priority: Critical
         Attachments: hs_err_pid858.log

When I call "closeConnection()"  (see below) after establishing a new connection to activeMQ
my JVM crashes (see jvm crash log attached):

Here are the details:
I open a connection to activemq in the following manner:

private Session _session;
private Connection _connection;
private String _jms_url;
private boolean _is_durable_subscriber;
private MessageWrapperIntf _msg_wrapper_intf;
protected static Logger log = Log.getLogger(MessageManager.class);

public void createConnection(String jms_url, MessageWrapperIntf intf, boolean is_durable_subscriber)
throws Exception {
 _jms_url = jms_url;
 _is_durable_subscriber = is_durable_subscriber;
 _msg_wrapper_intf = intf;
 
 log.info("");
 log.info("");
 log.info("Creating Connection to: " + jms_url);
 log.info("");
 String user = ActiveMQConnection.DEFAULT_USER;
 String password = ActiveMQConnection.DEFAULT_PASSWORD;

 //jms_url = addJMSOptions(jms_url);
 ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password,
jms_url);
 connectionFactory.setDispatchAsync(true);
 connectionFactory.setUseAsyncSend(true);
 
 _connection = connectionFactory.createConnection();
 _connection.setExceptionListener(this);

 if (is_durable_subscriber)
 	_connection.setClientID(_msg_wrapper_intf.getClass().getName());
 
 _connection.start();
 _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
}

and then I close the connection as following:

public void closeConnection() throws Exception {
if (_session != null)
	_session.close();

if (_connection != null) {
	_connection.stop();
	_connection.close();
}
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message