Author: veithen
Date: Sun Sep 7 02:32:06 2008
New Revision: 692802
URL: http://svn.apache.org/viewvc?rev=692802&view=rev
Log:
SYNAPSE-436: Fixed an issue with the constructor
JMSOutTransportInfo(JMSConnectionFactory, Destination) not setting the
destinationType correctly. Also removed the
JMSOutTransportInfo(ConnectionFactory, Destination) constructor which had the
same problem but is never used.
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/jms/JMSOutTransportInfo.java
Modified:
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/jms/JMSOutTransportInfo.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/jms/JMSOutTransportInfo.java?rev=692802&r1=692801&r2=692802&view=diff
==============================================================================
---
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/jms/JMSOutTransportInfo.java
(original)
+++
synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/jms/JMSOutTransportInfo.java
Sun Sep 7 02:32:06 2008
@@ -21,6 +21,7 @@
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
+import javax.jms.Topic;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NameNotFoundException;
@@ -64,17 +65,6 @@
private String contentType = null;
/**
- * Creates an instance using the given connection factory and destination
- *
- * @param connectionFactory the connection factory
- * @param dest the destination
- */
- JMSOutTransportInfo(ConnectionFactory connectionFactory, Destination dest)
{
- this.connectionFactory = connectionFactory;
- this.destination = dest;
- }
-
- /**
* Creates an instance using the given JMS connection factory and
destination
*
* @param jmsConnectionFactory the JMS connection factory
@@ -83,6 +73,8 @@
JMSOutTransportInfo(JMSConnectionFactory jmsConnectionFactory, Destination
dest) {
this.jmsConnectionFactory = jmsConnectionFactory;
this.destination = dest;
+ destinationType = dest instanceof Topic ?
JMSConstants.DESTINATION_TYPE_TOPIC
+ :
JMSConstants.DESTINATION_TYPE_QUEUE;
}
/**