Skip to content
Permalink
Browse files
CXF-5543 Remove specific JMSEndpoint subclasses as they are not used
git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1567769 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cschneider committed Feb 12, 2014
1 parent 1903171 commit 5a140bb6d402976dba1e87924da86ca4d4390d2d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 122 deletions.
@@ -213,11 +213,11 @@ protected static JMSEndpoint createEndpoint(String uri, String remaining) throws
// JMSConfiguration newConfiguration = getConfiguration().copy();
JMSEndpoint endpoint = null;
if (isQueue) {
endpoint = new JMSQueueEndpoint(uri, subject);
endpoint = new JMSEndpoint(uri, JMSURIConstants.QUEUE, subject);
} else if (isTopic) {
endpoint = new JMSTopicEndpoint(uri, subject);
endpoint = new JMSEndpoint(uri, JMSURIConstants.TOPIC, subject);
} else if (isJndi) {
endpoint = new JMSJNDIEndpoint(uri, subject);
endpoint = new JMSEndpoint(uri, JMSURIConstants.JNDI, subject);
}
return endpoint;
}

This file was deleted.

This file was deleted.

This file was deleted.

@@ -29,15 +29,15 @@ public class JMSEndpointTest extends Assert {
@Test
public void testBasicQueue() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals(endpoint.getDestinationName(), "Foo.Bar");
assertEquals(endpoint.getJmsVariant(), JMSURIConstants.QUEUE);
}

@Test
public void testQueueParameters() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?foo=bar&foo2=bar2");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals(endpoint.getDestinationName(), "Foo.Bar");
assertEquals(endpoint.getJmsVariant(), JMSURIConstants.QUEUE);
assertEquals(endpoint.getParameters().size(), 2);
@@ -48,15 +48,15 @@ public void testQueueParameters() throws Exception {
@Test
public void testBasicTopic() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:topic:Foo.Bar");
assertTrue(endpoint instanceof JMSTopicEndpoint);
assertEquals(JMSURIConstants.TOPIC, endpoint.getJmsVariant());
assertEquals(endpoint.getDestinationName(), "Foo.Bar");
assertEquals(endpoint.getJmsVariant(), JMSURIConstants.TOPIC);
}

@Test
public void testTopicParameters() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:topic:Foo.Bar?foo=bar&foo2=bar2");
assertTrue(endpoint instanceof JMSTopicEndpoint);
assertEquals(JMSURIConstants.TOPIC, endpoint.getJmsVariant());
assertEquals(endpoint.getParameters().size(), 2);
assertEquals(endpoint.getParameter("foo"), "bar");
assertEquals(endpoint.getParameter("foo2"), "bar2");
@@ -65,7 +65,7 @@ public void testTopicParameters() throws Exception {
@Test
public void testBasicJNDI() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:jndi:Foo.Bar");
assertTrue(endpoint instanceof JMSJNDIEndpoint);
assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
assertEquals(endpoint.getDestinationName(), "Foo.Bar");
assertEquals(endpoint.getJmsVariant(), JMSURIConstants.JNDI);
}
@@ -76,7 +76,7 @@ public void testJNDIParameters() throws Exception {
+ "=org.apache.activemq.jndi.ActiveMQInitialContextFactory"
+ "&jndiConnectionFactoryName=ConnectionFactory"
+ "&jndiURL=tcp://localhost:61616");
assertTrue(endpoint instanceof JMSJNDIEndpoint);
assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
assertEquals(endpoint.getParameters().size(), 0);
assertEquals(endpoint.getDestinationName(), "Foo.Bar");
assertEquals(endpoint.getJndiInitialContextFactory(),
@@ -89,7 +89,7 @@ public void testJNDIParameters() throws Exception {
@Test
public void testReplyToNameParameters() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?replyToName=FOO.Tar");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals("Foo.Bar", endpoint.getDestinationName());
assertNull(endpoint.getTopicReplyToName());
assertEquals("FOO.Tar", endpoint.getReplyToName());
@@ -113,7 +113,7 @@ public void testJNDIWithAdditionalParameters() throws Exception {
+ "&jndiConnectionFactoryName=ConnectionFactory"
+ "&jndiURL=tcp://localhost:61616"
+ "&jndi-com.sun.jndi.someParameter=someValue");
assertTrue(endpoint instanceof JMSJNDIEndpoint);
assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
assertEquals(endpoint.getParameters().size(), 0);
assertEquals(endpoint.getJndiInitialContextFactory(),
"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
@@ -128,7 +128,7 @@ public void testJNDIWithAdditionalParameters() throws Exception {
public void testSharedParameters() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?" + "deliveryMode=NON_PERSISTENT"
+ "&timeToLive=100" + "&priority=5" + "&replyToName=foo.bar2");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals(endpoint.getParameters().size(), 0);
assertEquals(endpoint.getDeliveryMode().toString(),
JMSURIConstants.DELIVERYMODE_NON_PERSISTENT.toString());
@@ -147,7 +147,7 @@ public void testRequestUri() throws Exception {
+ "&priority=3"
+ "&foo=bar"
+ "&foo2=bar2");
assertTrue(endpoint instanceof JMSJNDIEndpoint);
assertEquals(JMSURIConstants.JNDI, endpoint.getJmsVariant());
assertEquals(endpoint.getParameters().size(), 3);
String requestUri = endpoint.getRequestURI();
// Checking what's the request uri should have
@@ -164,15 +164,15 @@ public void testRequestUri() throws Exception {
@Test
public void testRequestUriWithMessageType() throws Exception {
JMSEndpoint endpoint = resolveEndpoint("jms:queue:Foo.Bar?messageType=text");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals("text", endpoint.getMessageType().value());

endpoint = resolveEndpoint("jms:queue:Foo.Bar");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals("byte", endpoint.getMessageType().value());

endpoint = resolveEndpoint("jms:queue:Foo.Bar?messageType=binary");
assertTrue(endpoint instanceof JMSQueueEndpoint);
assertEquals(JMSURIConstants.QUEUE, endpoint.getJmsVariant());
assertEquals("binary", endpoint.getMessageType().value());

}

0 comments on commit 5a140bb

Please sign in to comment.