RE: JMS debugging

2000-10-04 Thread Jai Jones

Queue's don't work, period.  We've tried them from regular java classes and
Message Driven beans neither work.  We sent messages to the Orion team about
this but haven't received a response yet.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Markus
Holmberg
Sent: Tuesday, October 03, 2000 3:52 PM
To: Orion-Interest
Subject: Re: JMS debugging


I have yet to hear from someone who successfully managed to get a
message delivered to a MessageDrivenBean listening on a Queue. (I know
one or two others in addition to myself who haven't got it working with
Queues, Topics work fine though).

Markus

On Tue, Oct 03, 2000 at 11:57:58AM -0400, John D'Ausilio wrote:
 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

--

Markus Holmberg |   Give me Unix or give me a typewriter.
[EMAIL PROTECTED]  |   http://www.freebsd.org/





JMS Queue's Don't work

2000-10-02 Thread Jai Jones

Is anyone able to receive asynchronous messages using JMS Queue's?  I'm
able to receive messages synchronously using the receive method.
However when using the MessageListener interface I never receive any
messages.  This problem apears to be for Queues only Topics work fine.
If anyone has a solution would he/she please submit an example.





RE: Can't set QueueReceiver for TemporaryQueue - Invalid Queue Exception

2000-09-27 Thread Jai Jones

I'm unable to use Temporary Queues either.  It definitely looks like a bug.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cathleen Dull
Sent: Wednesday, September 27, 2000 11:53 AM
To: Orion-Interest
Subject: Can't set QueueReceiver for TemporaryQueue - Invalid Queue
Exception


Help - I am stuck!  Has anyone used a TemporaryQueue on Orion? 

I get an Invalid Queue Exception when trying to create a QueueReceiver
for a TemporaryQueue.  The exception and the QueueTestSender and
QueueTestReceiver classes are attached below.  The error occurs when I
run the QueueTestSender, which creates the TemporaryQueue and then
attempts to create a QueueReceiver for the TemporaryQueue.  

I am using Orion 1.2.9 on Windows NT.  This code works fine on the
Weblogic application server. 
I reported it as a bug to Bugzilla today.


C:\Orion\orion\applications\OrionTempQueue\lib\javajava 
OrionTempQueue.OrionTestSender
Sender:  The temporary queue was assigned this name: 
com.evermind.server.jms.cq@4cb029
javax.jms.InvalidDestinationException: Invalid queue
at com.evermind.server.jms.cv.createReceiver(JAX)
at com.evermind.server.jms.cv.createReceiver(JAX)
at
OrionTempQueue.OrionTestSender.initJMS(OrionTestSender.java:79)
at
OrionTempQueue.OrionTestSender.init(OrionTestSender.java:46)
at OrionTempQueue.OrionTestSender.main(OrionTestSender.java:176)
Receiver:  Ready to receive messages
javax.jms.JMSException: QueueConnection not started
at com.evermind.server.jms.cw.send(JAX)
at com.evermind.server.jms.cw.send(JAX)
at com.evermind.server.jms.cw.send(JAX)
at
OrionTempQueue.OrionTestSender.sendRequest(OrionTestSender.java:103)
at OrionTempQueue.OrionTestSender.main(OrionTestSender.java:181)
Exception in thread "main" java.lang.NullPointerException
at
OrionTempQueue.OrionTestSender.closeJMS(OrionTestSender.java:160)
at
OrionTempQueue.OrionTestSender.sendRequest(OrionTestSender.java:109)
at OrionTempQueue.OrionTestSender.main(OrionTestSender.java:181)

*
 * OrionTestSender.java
 *
 * Created on July 7, 2000, 2:02 PM
 *
 */
package OrionTempQueue;

import javax.jms.*;
import javax.naming.*;
import java.util.*;
import java.util.Properties;

/** QueueTestSender sends a request message to a
 * permanent queue, and receives a response message on a temporary
queue.
 * p
 * It creates a temporary queue for the response, then
 * creates a request message with that temporary queue in the JMSReplyTo
field,
 * then writes the request message to a permanent queue, and listens for
the
 * response message on the temporary queue.
 * p
 * Start the Orion server first, then run QueueTestSender.
 *
 * @author  cdull
 * @version  %I%, %G%
 */
public class OrionTestSender implements MessageListener{

//private boolean messageReceived;
private int messageReceived;
private Queue queue;
private QueueSender msgSender;
private QueueReceiver responseReceiver;
private QueueSession writeSession;
private QueueSession readSession;
private QueueConnection conn;
private TemporaryQueue responseQueue;
private Context ctx;
private OrionTestReceiver myReceiver;

/** Creates new QueueTestSender*/
public OrionTestSender() {
messageReceived = 0;
try {
ctx = getInitialContext();
initJMS();
}
catch (Exception e) {
e.printStackTrace();
}

 myReceiver = new OrionTestReceiver();
}

/**Sets up all of the JMS stuff: connections, sessions, queues,
sender,
* and receiver, creates a temporary queue for the response messages,
puts 
the
* name of the temporary queue in the JMSReplyTo field of the request
* message, and sends the request message on the permanent queue
*/
private void initJMS () {
try {
QueueConnectionFactory factory = 
(QueueConnectionFactory)ctx.lookup("jms/QueueConnectionFactory");
Queue requestQueue = (Queue)ctx.lookup("jms/sampleQueue");
conn = factory.createQueueConnection();

//establish separate write and read sessions
readSession = conn.createQueueSession(false, 
Session.AUTO_ACKNOWLEDGE);
//writeSession = secondConn.createQueueSession(false, 
Session.AUTO_ACKNOWLEDGE);
writeSession = conn.createQueueSession(false, 
Session.AUTO_ACKNOWLEDGE);

//create a MessageSender for the permanent requestQueue
msgSender = writeSession.createSender(requestQueue);

//create a temporary queue for responses, and try to print
it's name
responseQueue = readSession.createTemporaryQueue();
System.out.println("Sender:  The temporary queue was
assigned this 
name: " + responseQueue.toString());

//create a receiver for the temporary response queue
responseReceiver =