Is there any way to look 'inside' of a Queue in orion? I've got a
message-driven bean listening on a queue, and a client that stuffs a message
into that queue. The client runs fine with no exceptions, but the bean never
seems to receive the message.

Can anyone give me some clues?

john d

jms.xml:
<jms-server port="9127">
        <queue name="processMonitor" location="jms/processMonitor">
                <description>queue for handling activity completion 
events</description>
        </queue>
        <log>
                <file path="../log/jms.log" />
        </log>
</jms-server>

ejb-jar.xml (fragment):
<message-driven>
        <description>Processes incoming activity completion
notifications</description>

<display-name>com.ipicorp.ejb.workflow.WorkflowProcessMonitor</display-name>
        <ejb-name>WorkflowProcessMonitor</ejb-name>
        <ejb-class>com.ipicorp.ejb.workflow.WorkflowProcessMonitor</ejb-class>
        <transaction-type>Container</transaction-type>
        <jms-message-selector>JMSType='activityCompletion'</jms-message-selector>
        <message-driven-destination>
                <jms-destination-type>javax.jms.Queue</jms-destination-type>
        </message-driven-destination>
</message-driven>

client app:
jmsContext = new InitialContext(getJMSEnvironment());
// jms and message-driven bean testing
Queue queue = (Queue) jmsContext.lookup("jms/processMonitor");
QueueSession queueSession = null;
QueueSender sender = null;
try {
        QueueConnectionFactory queueConnectionFactory =
                (QueueConnectionFactory) jmsContext.lookup(
                        "jms/QueueConnectionFactory");
        QueueConnection connection =
queueConnectionFactory.createQueueConnection();
        connection.start();
        queueSession = connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
        sender = queueSession.createSender(queue);
        System.out.println("Got the send q");

        Message message = queueSession.createMessage();
        message.setJMSType("activityCompletion");
        message.setLongProperty("date", new Date().getTime());
        message.setStringProperty("event", "foo");
        sender.send(message);
        System.out.println("Message sent");
} catch (JMSException jmse) {
        throw new java.rmi.RemoteException(jmse.getMessage());
}


Reply via email to