If you write a separate client app to access JMS messages you need to have jndi.properties file or you need to provide the properties to the InitialContext.  Here aret the steps to write a separate client app which runs outside the orion environment.
 
1) In your jms.xml don't have any connection factory just declare your topics/queues
 
2) Either have jndi.properties in the class path with the following contents
    java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory
    java.naming.provider.url=ormi://localhost/
    java.naming.security.principal=admin
    java.naming.security.credentials=admin
 
    Or create a Hashatble with the above key, values and pass to the InitialContext constructor.
 
3) If you are using orion1.4.8 which creating connection from factory pass username/password as a paramters to
    factory.createXXXConnection(username, password).
 
 
I hope this will work.
 
----- Original Message -----
Sent: Wednesday, May 16, 2001 7:16 PM
Subject: Re: HELP! 1.4.5 and JMS

Hi Kesav,

Thanks for the tip. I tried that with both 1.4.5 and 1.4.8.  After removing the connection factory line, in 1.4.5, the client hangs on TopicConnection.createSubscriber().  If I give the createTopicConnection a username and password, then the server throws a NPE and the client hangs at createTopicConnection().

The same problem persists in 1.4.8.

I'm sure I'm doing something really stupid.  However, I have no idea how to solve it.  I'm attaching some code in the hope that someone can help me out of this mess.  I've tried it against 1.4.5 and 1.4.8.  And I am really desperate!

Thanks,
Vidur

Kesav Kumar wrote:

 

Just remove the connectionfactory line from your jms.xml.

Kesav Kumar
Software Engineer
Voquette, Inc.
650 356 3740
mailto:[EMAIL PROTECTED]
http://www.voquette.com
Voquette...Delivering Sound Information

-----Original Message-----
From: Vidur Dhanda [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 11:31 AM
To: Orion-Interest
Subject: HELP! 1.4.5 and JMS

Please help!  I broke something in my code and can't figure it out.  On
the client, I'm consistently getting:
java.lang.NullPointerException
 at java.io.DataOutputStream.writeUTF(DataOutputStream.java:329)
 at java.io.DataOutputStream.writeUTF(DataOutputStream.java:306)
 at com.evermind.server.jms.cj.<init>(JAX)
 at com.evermind.server.jms.b8.start(JAX)
 at
com.epistemic.km.server.NotificationBase.getConnection(NotificationBase.java:89)

 at
com.epistemic.km.server.NotificationBase.getSession(NotificationBase.java:101)

 at
com.epistemic.km.server.NotificationBase.getSubscriber(NotificationBase.java:44)

Auto-started clients can send/receive messages without trouble.

getConnection() calls createTopicConnection() and then start().
If I use, createConnection (usr, pwd), then the system hangs.

In jms.xml, I have:
<jms-server host="192.168.10.2" port="9127">
 <topic-connection-factory host="192.168.10.2"
      location="jms/notificationFactory" port="9127" />
 <topic name="DWItem Notification" location="jms/dwItemNotification">
 </topic>

Any ideas?  I'm on version 1.4.5.  1.4.8 has a regression on bug 188
that is a show stopper for us.  And in fact, this code worked uptil
yesterday when I made changes to try and get 1.4.8 to work.

TIA,
Vidur

PS.  If possible, please also cc me directly.  I'm really desperate.
--
Vidur Dhanda
Active Solutions
tel: 617/566-1252
cell: 617/821-7115
[EMAIL PROTECTED]
www.active-solutions-inc.com
 

--
Vidur Dhanda
Active Solutions
tel: 617/566-1252
cell: 617/821-7115
[EMAIL PROTECTED]
www.active-solutions-inc.com
 

Reply via email to