This commit is contained in:
Dejan Bosanac 2014-08-06 15:22:16 +02:00
parent 052d293143
commit acf84b43e9
2 changed files with 21 additions and 0 deletions

View File

@ -23,7 +23,13 @@ import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.junit.PaxExam;
import javax.jms.Connection;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TemporaryQueue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@RunWith(PaxExam.class)
@ -63,4 +69,15 @@ public class ActiveMQBrokerFeatureTest extends AbstractJmsFeatureTest {
assertEquals("got our message", nameAndPayload, consumeMessage(nameAndPayload));
}
@Test
public void testTemporaryDestinations() throws Throwable {
Connection connection = getConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
TemporaryQueue temporaryQueue = session.createTemporaryQueue();
session.createProducer(temporaryQueue).send(session.createTextMessage("TEST"));
Message msg = session.createConsumer(temporaryQueue).receive(3000);
assertNotNull("Didn't receive the message", msg);
connection.close();
}
}

View File

@ -62,6 +62,10 @@
<authorizationEntry topic=">" read="admin" write="admin" admin="admin"/>
<authorizationEntry topic="ActiveMQ.Advisory.>" read="admin" write="admin" admin="admin"/>
</authorizationEntries>
<tempDestinationAuthorizationEntry>
<tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/>
</tempDestinationAuthorizationEntry>
</authorizationMap>
</map>
</authorizationPlugin>