[ http://jira.activemq.org/jira//browse/AMQ-641?page=comments#action_35776 
] 

james strachan commented on AMQ-641:
------------------------------------

This is not strictly true; the JMS API consists of a number of synchronous APIs 
and some asynchronous APIs. The asynchronous part is really the 
consumer.setMessageListener().

In the JMS specification, operations such as createConnnection, createSession, 
createProducer, createConsumer, send, commit, rollback are all actually 
synchronous operations - for good reason since due to security constraints, 
they could fail - or for reliability reasons users need to know a transaction 
or message send did actually work and make it to the broker.

However ActiveMQ does have an extension where we can configure all send 
operations to be asynchronous by default, so once a connection is established, 
sends will be non-blocking.
e.g. for 3.x use tcp;//localhost:61616?useAsyncSend=true

http://activemq.org/ActiveMQ+3+Transport+Configurations

>  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

Reply via email to