Hi,

I'm using 0rion 0.9.4l.

I declared a jms topic in my jms.xml file as follows:

        <topic name="Trade Manager Topic" location="jms/TradeManagerTopic">
                <description>trade manager topic</description>
        </topic>

Now I can access a TopicConnectionFactory and the above mentionned jms topic
through JNDI from within EJBs.

But all my efforts to access those same things from a stand alone
application client have failed.

Here is the jndi.properties file used by my client:
        
java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
        
#java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactor
y
        java.naming.provider.url=ormi://localhost/idee
        java.naming.security.principal=admin
        java.naming.security.credentials=123

Because I'm using the ApplicationClientInitialContextFactory I had to create
a application-client.xml file.

In the client I first look up the TopicConnectionFactory with:
        Context ctx = new InitialContext();
        TopicConnectionFactory connectionFactory =
(TopicConnectionFactory)ctx.lookup("jms/TopicConnectionFactory");
but this always fails with a NamingException.

So I tried declaring the connection factory as a resource in the
application-client.xml file with:
        <resource-ref>
                <res-ref-name>jms/TopicConnectionFactory</res-ref-name>
                <res-type>javax.jms.TopicConnectionFactory</res-type>
                <res-auth>Application</res-auth>
        </resource-ref>

And now the client fails with:
Exception in thread "main" javax.naming.NamingException: Error reading
application-client descriptor: Error creating context:
jms/TopicConnectionFactory not found
        at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(JAX)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
        at javax.naming.InitialContext.init(InitialContext.java:226)
        at javax.naming.InitialContext.<init>(InitialContext.java:182)
        at
com.decalog.servers.te.TradeManagerServer.getInitialContext(TradeManagerServ
er.java:191)
        at
com.decalog.servers.te.TradeManagerServer.main(TradeManagerServer.java:171)
        

I must be missing something...
Philippe.

 

Philippe Renon
décalog - 5, rue Bachaumont - 75002 PARIS
Voice   : +33 (0) 1 40 28 44 64
Fax             : +33 (0) 1 40 28 24 54
E-mail  : mailto:[EMAIL PROTECTED]
 



Reply via email to