Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/com/rabbitmq/jms/admin/RMQObjectFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
* <li>port</li>
* <li>queueBrowserReadMax</li>
* <li>onMessageTimeoutMs</li>
* <li>channelsQos</li>
* <li>ssl</li>
* <li>terminationTimeout</li>
* <li>username</li>
Expand Down Expand Up @@ -191,6 +192,7 @@ public Object createConnectionFactory(Reference ref, Hashtable<?, ?> environment
f.setPort (getIntProperty (ref, environment, "port", true, f.getPort() ));
f.setQueueBrowserReadMax(getIntProperty (ref, environment, "queueBrowserReadMax", true, f.getQueueBrowserReadMax()));
f.setOnMessageTimeoutMs (getIntProperty (ref, environment, "onMessageTimeoutMs", true, f.getOnMessageTimeoutMs() ));
f.setChannelsQos (getIntProperty (ref, environment, "channelsQos", true, f.getChannelsQos() ));
if (getBooleanProperty(ref, environment, "ssl", true, f.isSsl())) {
try {
f.useSslProtocol();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import javax.naming.Reference;
import java.util.Hashtable;

import static com.rabbitmq.jms.client.RMQConnection.NO_CHANNEL_QOS;
import static org.junit.jupiter.api.Assertions.*;

/**
Expand Down Expand Up @@ -35,6 +36,7 @@ public void getObjectInstanceShouldCreateARMQConnectionFactoryViaReference() thr
assertEquals("guest", createdConFactory.getPassword());
assertEquals("/", createdConFactory.getVirtualHost());
assertEquals("localhost", createdConFactory.getHost());
assertEquals(NO_CHANNEL_QOS, createdConFactory.getChannelsQos());

}

Expand All @@ -48,6 +50,7 @@ public void getObjectInstanceShouldCreateARMQConnectionFactoryViaEnvironment() t
put("password", "1234");
put("virtualHost", "/fake");
put("host", "fakeHost");
put("channelsQos", 10);
}};

Object createdObject = rmqObjectFactory.getObjectInstance("anything but a javax.naming.Reference", new CompositeName("java:global/jms/TestConnectionFactory"), null, environment);
Expand All @@ -61,6 +64,7 @@ public void getObjectInstanceShouldCreateARMQConnectionFactoryViaEnvironment() t
assertEquals("1234", createdConFactory.getPassword());
assertEquals("/fake", createdConFactory.getVirtualHost());
assertEquals("fakeHost", createdConFactory.getHost());
assertEquals(10, createdConFactory.getChannelsQos());

}

Expand Down