[jboss-svn-commits] JBL Code SVN: r6889 - in labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta: src/org/jboss/soa/esb/addressing/helpers tests/src/org/jboss/soa/esb/addressing/helpers/tests
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 18 10:51:35 EDT 2006
Author: estebanschifman
Date: 2006-10-18 10:51:30 -0400 (Wed, 18 Oct 2006)
New Revision: 6889
Modified:
labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/helpers/JMSEpr.java
labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java
Log:
Added jndi-type, jndi-url and message-selector tags
Modified: labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/helpers/JMSEpr.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/helpers/JMSEpr.java 2006-10-18 13:17:49 UTC (rev 6888)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/src/org/jboss/soa/esb/addressing/helpers/JMSEpr.java 2006-10-18 14:51:30 UTC (rev 6889)
@@ -53,7 +53,10 @@
public static final String DESTINATION_TYPE_TAG = "destination-type";
public static final String DESTINATION_NAME_TAG = "destination-name";
public static final String CONNECTION_FACTORY_TAG = "connection-factory";
-
+ public static final String JNDI_TYPE_TAG = "jndi-type";
+ public static final String JNDI_URL_TAG = "jndi-URL";
+ public static final String MESSAGE_SELECTOR_TAG = "message-selector";
+
public static final String QUEUE_TYPE = "queue";
public static final String TOPIC_TYPE = "topic";
@@ -64,6 +67,7 @@
/**
* Create a new JMS EPR. The protocol version is assumed to be 1.1.
+ * , jndi_type=jboss, jndi_url=localhost, messageSelector=null
*
* @param destinationType the type of destination (queue/topic).
* @param destinationName name of the queue/topic.
@@ -72,19 +76,39 @@
public JMSEpr (String destinationType, String destinationName, String connection)
{
- this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection);
+ this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection
+ ,"jboss", "localhost", null);
}
/**
+ * Create a new JMS EPR. The protocol version is assumed to be 1.1.
+ *
+ * @param destinationType the type of destination (queue/topic).
+ * @param destinationName name of the queue/topic.
+ * @param connection reference to the connection factory.
+ * @param jndiType reference to the type of jndi to obtain the JMS objects from
+ * @param jndiUrl reference to the location of the jndi to obtain the JMS objects from
+ * @param messageSelector reference to the connection factory.
+ */
+
+ public JMSEpr (String destinationType, String destinationName, String connection, String jndiType, String jndiUrl, String messageSelector)
+ {
+ this(ONE_ONE_PROTOCOL, destinationType, destinationName, connection,jndiType, jndiUrl, messageSelector);
+ }
+
+ /**
* Create a new JMS EPR.
*
* @param protocol the protocol version.
* @param destinationType the type of destination (queue/topic).
* @param destinationName name of the queue/topic.
* @param connection reference to the connection factory.
+ * @param jndiType reference to the type of jndi to obtain the JMS objects from
+ * @param jndiUrl reference to the location of the jndi to obtain the JMS objects from
+ * @param messageSelector reference to the connection factory.
*/
- public JMSEpr (String protocol, String destinationType, String destinationName, String connection)
+ public JMSEpr (String protocol, String destinationType, String destinationName, String connection, String jndiType, String jndiUrl, String messageSelector)
{
// how many of these do we really need? modify accordingly.
@@ -105,6 +129,15 @@
if (connection != null)
addr.addExtension(CONNECTION_FACTORY_TAG, connection);
+ if (jndiType != null)
+ addr.addExtension(JNDI_TYPE_TAG, jndiType);
+
+ if (jndiUrl != null)
+ addr.addExtension(JNDI_URL_TAG, jndiUrl);
+
+ if (messageSelector != null)
+ addr.addExtension(MESSAGE_SELECTOR_TAG, messageSelector);
+
setAddr(addr);
}
else
Modified: labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java 2006-10-18 13:17:49 UTC (rev 6888)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/rosetta/tests/src/org/jboss/soa/esb/addressing/helpers/tests/JMSUnitTest.java 2006-10-18 14:51:30 UTC (rev 6889)
@@ -39,7 +39,7 @@
{
try
{
- new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar");
+ new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar",null,null,null);
}
catch (Exception ex)
{
@@ -51,7 +51,7 @@
{
try
{
- JMSEpr jms = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar");
+ JMSEpr jms = new JMSEpr(JMSEpr.ONE_ONE_PROTOCOL, JMSEpr.QUEUE_TYPE, "bar", "foobar",null,null,null);
assertEquals(jms.getVersion(), JMSEpr.ONE_ONE_PROTOCOL);
assertEquals(jms.getConnectionFactory(), "foobar");
More information about the jboss-svn-commits
mailing list