Kevin,

Glad to hear that it is now working for you (I was running out of ideas
:)).  

Your temporary destination concerns are understandable, it is a little
confusing.  The creation of a temporary destination and the ability to
consume off of said destination are tied to the connection.  When the
connection drops or closes, the destination is no longer available.  

However, the ability to send to the destination is not tied to the
connection that created it.  The destination can be passed over JMS to
listeners in any VM using any connection.  These listeners can then
retrieve the destination in the JMSReplyTo header and send to it.  This
works as long as the connection that created the destination is still
alive somewhere.

So in summary, consumption off of a temporary destination is tied to the
connection.  The ability to send to the destination is available to all
JMS clients as long as that destination still exists.  Thus, your
configuration works as expected.  Does that clear things up a bit?

Thanks,
Jaime 

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 19, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Hi Jaime,

Now the JMS sample can run using both SonicMQVendorAdapter or JNDI, the
reason why the JNDI approach didn't work is I missed a
$SONIC_HOME/lib/tools.jar in my classpath, so wired it reported a
classcast
exception before.

I get rid of JMSListner from JMSTest.java and add another class to run
JMSListner within another JVM, and want to test if Temporary queue can
work
in multiple VMs environment.

To my superise, it still works. JMSTest still can get response.

How come? Because to my understanding, now JMSTest and JMSListner are
connecting to JMS server with different connections, they can not access
the
same Temporary queue.


Thanks,
kevin


-----Original Message-----
From: Jaime Meritt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 2:02 PM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Kevin,

Most of what I am referring to is located in the latest Axis version
from CVS.  You can wait for a bug fix release, pick up a nightly build,
or check it out from cvs yourself.  I've attached the file with this
message as well.

Thanks,
Jaime

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 1:55 PM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Hi Jaime,

Are you using axis 1.0? I cannot find
sonic-connection-factory.properties.

Thanks,
Kevin


-----Original Message-----
From: Jaime Meritt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:56 AM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Kevin,

Inline inside <Jaime></Jaime> tags.

Thanks,
Jaime

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 10:19 AM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Thanks Jaime and David,

I think I followed the instruction in AxisJMSSample.pdf, and I'm using
the
file-based jndi provider as methioned in the pdf file. Attached you can
find
the bindings file in "JNDIStore" folder. It is fine, isn't it?

<Jaime>
It does look fine.  I'm not sure why you are experiencing the JNDI
issues.  Perhaps you should try the Sonic vendor adapter.  If we can get
that working then at least we know that the problem is in our JNDI
vendor adapter. Given this information it should be a little easier to
debug on our side
</Jaime>

By the way, can I ask several questions?

1. We need implement request/response, if the message producer and
consumer
locate in different VM, the temporary queue and JMSReplyTo mechnism will
not
work, because the scope of temporary queue is connection, right?

<Jaime>There are two separate issues here.  You are correct in that the
temporary destination mechanism is bound to the connection lifecycle.
Therefore this solution will not work across different connections or
JVMs.  To resolve this issue, we can make modifications to the JMS
transport that allows the client code to explicitly state the reply to
destination as a non-temporary location.  This would allow client code
in the same VM to survive request/response when a connection drops.

However, this does not resolve the issue of multiple VMs.  To use
multiple VMs, you have to send in one VM (let's call it VM1) and receive
the response in another, VM2.  If you could explicitly set the ReplyTo
as described above, you could send from VM1 with the WAIT_FOR_RESPONSE
flag set to false.  This allows the sender to publish a message to a Q
or topic and continue processing without waiting for a response.  The
server process in VM3 would get the message and invoke the web service.
Upon completion, it sends the message to the replyTo destination that
was explicitly set by the client.  Now here's the problem.  VM2 in this
configuration must be setup to wait for responses to the request sent by
VM1.  From the client side, there exists no API to wait for unsolicited
messages so you are unable to receive the responses.  We are currently
working on this functionality and expect to publish a proposal early
next week.

There is however a workaround (read as hack) using the current code
base.  You could set up VM2 to be a SimpleJMSListener that receives
messages from the ReplyTo destination you sent in VM1.  Your response
processing code would in effect be another web service running within an
AxisServer.  However, the request message that generated this response
would be unavailable in this configuration.  I am assuming that since
you want to run in separate VMs that the correlation mechanism and
message persistence is externally provided.

If you want to give this configuration a try and need more information I
would be happy to help.
</Jaime>

2. There is no way to let a servlet receive message in an async way,
correct?

<Jaime>
Do you mean you want a JMS message to be received and dispatched to a
servlet for processing?  Please clarify what you are trying to do in
this use case.  With a little more information we may be able to find a
solution that works out for you.
</Jaime>

Thanks again,
Kevin




-----Original Message-----
From: Jaime Meritt [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 5:24 PM
To: [EMAIL PROTECTED]
Subject: RE: JMS sample can not run


Kevin,

It looks like the Connection Factory you are pulling out of JNDI is not
configured correctly.  Did you follow the steps in the document to setup
your connection factory in the JNDI repository?  Which JNDI
implementation are you using?

Since you are using SonicMQ, another option exists instead of JNDI.  You
can use the SonicMQVendorAdapter to automatically create your connection
factory upon startup as opposed to looking it up from the JNDI
repository.  This gives you the added benefit of zero-administration (no
JNDI setup).  You can try using this mechanism if the JNDI way doesn't
work.  To use the Sonic vendor adapter you need to set the system
property org.apache.axis.components.jms to the fully qualified classname
of the SonicMQVendorAdapter.  Instead of
jndi-connection-factory.properties, you should use
sonic-connection-factory.properties in the sample directory.  Let me
know how this works for you.

Thanks,
Jaime
Sonic Software Corporation

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 18, 2002 5:09 PM
To: [EMAIL PROTECTED]
Subject: JMS sample can not run

Hi,

I'm new to Axis, now I'm trying to run the JMS sample with SonicMQ.

But I got an exception like this:

C:\xml-axis-10\samples\jms>java samples.jms.JMSTest -c
jndi-connection-factory.p
roperties -d "MyQ" IBM PRGS
Nov 18, 2002 4:57:57 PM org.apache.axis.transport.jms.SimpleJMSListener
<init>
SEVERE: Exception:
java.lang.ClassCastException: javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:115)
Exception in thread "main" java.lang.ClassCastException:
javax.naming.Reference
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getConnectionFactory
(JNDIVendorAdapter.java:106)
        at
org.apache.axis.components.jms.JNDIVendorAdapter.getQueueConnectionFa
ctory(JNDIVendorAdapter.java:86)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createConnector(JMS
ConnectorFactory.java:168)
        at
org.apache.axis.transport.jms.JMSConnectorFactory.createServerConnect
or(JMSConnectorFactory.java:101)
        at
org.apache.axis.transport.jms.SimpleJMSListener.<init>(SimpleJMSListe
ner.java:120)
        at samples.jms.JMSTest.main(JMSTest.java:115)

Can anybody help out?

Thanks in advance.

Kevin









Reply via email to