You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Rob Davies (JIRA)" <ji...@apache.org> on 2009/08/29 07:59:16 UTC
[jira] Assigned: (AMQ-1594) Closing an ActiveMQ connection causes
1.5 JVM to crash
[ https://issues.apache.org/activemq/browse/AMQ-1594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rob Davies reassigned AMQ-1594:
-------------------------------
Assignee: Rob Davies
> 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: 4.1.1, 5.0.0, 5.1.0
> Environment: Linux (see attached file for more specs)
> Reporter: Denis Abramov
> Assignee: Rob Davies
> Priority: Critical
> Fix For: 5.3.0
>
> 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:
> {code}
> 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();
> }
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.