-
1. Re: TopicConnectionFactory questions
joelvogt Aug 21, 2002 8:05 PM (in response to blackcharlie)can you post the way you are trying to look up the connection factory and the error generated?
-
2. Re: TopicConnectionFactory questions
larsinge Aug 22, 2002 8:51 AM (in response to blackcharlie)Jeff Kramer,
I asume you are looking at the JBoss 2.4 docs and are running the JBoss 3.x server....
Try to connect to the "java:/ConnectionFactory" for both Queue and Topic in the JBoss 3.0.0. -
3. Re: TopicConnectionFactory questions
blackcharlie Aug 22, 2002 9:43 AM (in response to blackcharlie)joelvogt -
It's failing on this line:
TopicConnectionFactory conFactory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");
and here is the error:
D:\jboss>java Chat topic user s
javax.naming.NameNotFoundException: TopicConnectionFactory not bound
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:445)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:429)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at Chat.(Chat.java:38)
at Chat.main(Chat.java:125)
here's the code in context of the program:
//Obtain a JNDI connection
Properties env = new Properties();
//... specify JNDI properties specific to the vendor
env.put( Context.PROVIDER_URL, "jnp://localhost:1099" );
env.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
Context jndi = new InitialContext(env);
// Look up a JMS connection factory
TopicConnectionFactory conFactory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");
//Create a JMS conn
TopicConnection connection = conFactory.createTopicConnection(username, password);
Thanks for your interest,
Jeff -
4. Re: TopicConnectionFactory questions
blackcharlie Aug 22, 2002 9:57 AM (in response to blackcharlie)larsinge -
Yes, I'm using jboss 3.0.0 & have the jboss admin & development book covering 2.x
I'm afraid I am not that clear on your suggestion.
I think you mean instead of:
TopicConnectionFactory conFactory = (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");
try:
TopicConnectionFactory conFactory = (TopicConnectionFactory)jndi.lookup("ConnectionFactory");
With the change I now get this error:
D:\jboss>java Chat topic jeff x
log4j:WARN No appenders could be found for logger (org.jboss.mq.referenceable.Sp
yConnectionFactoryObjectFactory).
log4j:WARN Please initialize the log4j system properly.
javax.jms.JMSSecurityException: User: jeff is NOT authenticated
<<no stack trace available>>
This looks a little better I think, but still not working..
I have the \jboss-3.0.0\server\all\lib\log4j.jar;
in the classpath..
any further ideas?
Thanks!