Hi Genman,
I am using the code samples from documentation-example.zip I downloaded from this
site. Anyway, I am writing down the code I am using which is throwing the exception...
| /**
| * Sets up all the JMS fixtures.
| *
| * Use close() when finished with object.
| *
| * @param factoryJNDI name of the topic connection factory to look up.
| * @param topicJNDI name of the topic destination to look up
| */
| public HelloPublisher(String factoryJNDI, String topicJNDI)
| throws JMSException, NamingException {
|
| // Get the initial context
| Context context = new InitialContext();
|
| // Get the connection factory, here
| // factoryJNDI is TopicConnectionFactory
| // which I am passing from the main method. Exception is here.
| TopicConnectionFactory topicFactory =
| (TopicConnectionFactory)context.lookup(factoryJNDI);
|
| // Create the connection
| topicConnection = topicFactory.createTopicConnection();
|
| // Create the session
| topicSession = topicConnection.createTopicSession(
| // No transaction
| false,
| // Auto ack
| Session.AUTO_ACKNOWLEDGE);
|
| // Look up the destination
| // Here topicJNDI is the Topic I have
| // created in the file "jboss.jcml". I pass
| // this from the main method.
| topic = (Topic)context.lookup(topicJNDI);
|
| // Create a publisher
| topicPublisher = topicSession.createPublisher(topic);
|
| }
|
The jndi.properties file I use is :
| java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
| java.naming.provider.url=localhost:1099
| java.naming.factory.url.pkgs=org.jnp.interfaces
| .
The above Java code is the client code. I run this file from the console and I get
this exception then.
Thanks and will be waiting for your response.
Biswajit.
<a
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3824298#3824298">View
the original post</a>
<a
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3824298>Reply
to the post</a>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user