some of the JMS implementation classes could not be instantiated properly
in orion 0.9.4 ... and JNDI bindings weren't there for topics & queues ...
However, I could manage to get the examples working after a bit of reverse
engineering things and hacking the demos... but the JMS examples worked ! 

On the other hand, Orion 0.9.6 offers JNDI lookups for the
TopicConnectionFactory/QueueConnectionFactory and topics and queues
declared in the JMS.XML file can be accessed using JNDI lookups

In fact, the examples given depend on declaring an application-client.xml
which is not strictly necessary ... the TopicConnectionFactory and
QueueConnectionFactory are available in JNDI's "jms" namespace 

here's how i get the factory objects and the topic + queues

        java.util.Hashtable env = new java.util.Hashtable();
        env.put("java.naming.factory.initial", 
               "com.evermind.server.rmi.RMIInitialContextFactory");
        env.put("java.naming.provider.url", "ormi://localhost/");
        env.put("java.naming.security.principal", username);
        env.put("java.naming.security.credentials", password);

        InitialContext ic = new InitialContext(env);
                                        
        TopicConnectionFactory t_factory = 
        (TopicConnectionFactory) ic.lookup("jms/TopicConnectionFactory");
        
        QueueConnectionFactory q_factory = 
        (QueueConnectionFactory) ic.lookup("jms/QueueConnectionFactory");

        TopicConnection t_connection = t_factory.createTopicConnection();
        Topic topic = (Topic) ic.lookup("jms/a_topic");

        QueueConnection q_connection = q_factory.createQueueConnection();
        Queue queue = (Queue) ic.lookup("jms/a_queue");


and this is what the JMS.XML file looks like:

        <queue name="a queue" location="jms/a_queue"
persistence-file="../persistence/jms/a.queue"> </queue>

        <topic name="a topic" location="jms/a_topic"></topic>


hence, upgrade to 0.9.6 if you want JMS ! now on the other hand, it still
gives me a problem with topicSession.commit() ... 


        





At 10:46 AM 28/04/00 -0500, Eric Hodges wrote:
>I was never able to get JMS to work in Orion.  The test code wouldn't
>compiler, and some of the classes couldn't be instantiated.  I asked several
>times on this list and no one had any success with the JMS support.
>
>
>----- Original Message -----
>From: "Harsh Waghmare" <[EMAIL PROTECTED]>
>To: "Orion-Interest" <[EMAIL PROTECTED]>
>Sent: Friday, April 28, 2000 2:39 AM
>Subject: JMS TopicSession Transactions ...
>
>
>> does the Orion implementation of TopicSession support transactions ?
>> I have a topic session which I am creating like this
>>
>> TopicSession topicSession =
>>
>> topicConn.createTopicSession(true,TopicSession.AUTO_ACKNOWLEDGE);
>>
>> the topic session is therefore transacted. whenever i publish messages, i
>> follow them with a call to commit
>>
>> publisher.publish(mapMsg1);
>> publisher.publish(mapMsg2);
>> topicSession.commit();
>>
>> however, the commit() gives me the following error
>>
>> java.lang.ClassCastException: com.evermind.server.jms.cp
>>         at com.evermind.server.jms.b2.iu(JAX)
>>         at com.evermind.server.jms.b2.commit(JAX)
>>         at StockServer.run(StockServer.java:108)
>>         at java.lang.Thread.run(Thread.java:479)
>>
>> any ideas ? anyone out there tried transacted topic sessions ?
>> of course, the ejb stuff in orion works great !
>>
>> Harsh
>>
>>
>>
>>
>>
>
>
>


Reply via email to