activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tao (JIRA)" <j...@activemq.org>
Subject [jira] Commented: (AMQ-641) JMS is a asynchronous interface ,blocking is not allow.
Date Tue, 21 Mar 2006 03:05:26 GMT
    [ http://jira.activemq.org/jira//browse/AMQ-641?page=comments#action_35850 ] 

tao commented on AMQ-641:
-------------------------

I have patch this question.

In the file package org.apache.activemq.ActiveMQConnection;

    public Response syncSendPacket(Command command) throws JMSException {
        if (isClosed()) {
            throw new ConnectionClosedException();
        } else {
           /* if (command.isMessage() && flowControlSleepTime > 0) {
                try {
                    Thread.sleep(flowControlSleepTime);
                } catch (InterruptedException e) {
                }
            }
            */
            
            try {

               //Change by tao at 2006-3-21
               // Response response = this.transport.request(command);               
                Response response = this.transport.request(command,30000);

                if (response.isException()) {
                    ExceptionResponse er = (ExceptionResponse) response;
                    if (er.getException() instanceof JMSException)
                        throw (JMSException) er.getException();
                    else
                        throw JMSExceptionSupport.create(er.getException());
                }
                return response;
            } catch (IOException e) {
                throw JMSExceptionSupport.create(e);
            }
        }
    }

>  JMS is a asynchronous interface ,blocking is not allow.
> --------------------------------------------------------
>
>          Key: AMQ-641
>          URL: http://jira.activemq.org/jira//browse/AMQ-641
>      Project: ActiveMQ
>         Type: Bug

>   Components: JMS client, Connector
>     Versions: 3.2.2, 4.0 M4
>  Environment: winxp jdk1.4.2 jdk 1.5.6
>     Reporter: tao

>
>
> If I use failover:tcp//.... in the jms client,
> That all method will be blocked when net or activemq error.
> This  is not a good idea.My application will be blocked. 
> And If I use tcp//.... in the jms client,Sometimes ,send(message) method will be blocked,also
not return.
>  JMS is a asynchronous interface ,blocking is not allow at any condition.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message