Hi,

The <queue-connection-factory> tag, _if_ you decide to use it (it defaults
to localhost and port 9127), does not have a location attribute. Just the
<queue> tag does.

Also, your res-ref-name for your "queue-connection-factory" in your
ejb-jar.xml ought to be something more like "jms/MyQueueConnectionFactory";
I'm guessing that the periods in a JNDI name are a no-no. I don't know for
sure.

I have JMS working without a hitch and these are the immediate observations
I would make.

HTH, Arved Sandstrom

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Cathleen Dull
Sent: Tuesday, September 05, 2000 6:23 PM
To: Orion-Interest
Subject: NameNotFoundException - JMS


Hi;

I am trying to look up a queue from a stateless session bean, and I get
javax.naming.NameNotFoundException: jms/asynchQueue not found in
Generator.
The GeneratorBean class is attached, and the xml files are printed
below.

Thanks,
Cathy

 It is doing the lookup in this method:

  private void startJMS() throws NamingException, JMSException {
        ctx = new InitialContext();
        Object obj =
ctx.lookup("java:comp/env/jms/javax.jms.QueueConnectionFactory");
        QueueConnectionFactory factory = (QueueConnectionFactory)
        PortableRemoteObject.narrow(obj, QueueConnectionFactory.class);
        Object obj2 = ctx.lookup("java:comp/env/jms/asynchQueue");
        queue = (Queue)PortableRemoteObject.narrow(obj2, Queue.class);
        conn = factory.createQueueConnection();
        conn.start();
        session = conn.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
        sender = session.createSender(queue);
    }


Here are the jms.xml file and ejb-jar.xml files I am using:

<?xml version="1.0"?>
<!DOCTYPE jms-server PUBLIC "Orion JMS server"
"http://www.orionserver.com/dtds/jms-server.dtd">

<jms-server port="9127">

        <!--    Queue bindings, these queues will be bound to their respective
JNDI path for later     retrieval -->
        <queue-connection-factory
location="jms/javax.jms.QueueConnectionFactory" port="9127">
        </queue-connection-factory>
        <queue name="Demo Queue" location="jms/demoQueue"/>
        <queue name="asynchQueue" location="jms/asynchQueue"/>
        <!--    Topic bindings, these topic will be bound to their respective JNDI
path for
                        later retrieval -->
        <topic name="Demo Topic" location="jms/demoTopic"/>     <!-- path to the
log-file where JMS-events/errors are stored -->
        <log>
                <file path="../log/jms.log" />
        </log>
</jms-server>


Reply via email to