-
1. Re: TopicConnectionFactory not bound !
genman Mar 4, 2004 8:23 PM (in response to raja_chakraborty)
Post the code you're using to connect with, explain when you're using that code. Is it within JBoss or the client? Assuming you're using a client: Go the jmx-console and see if the JNDI object is printed in the JNDI tree. I think you want to lookup "ConnectionFactory" in JNDI and cast it. Adrian recommends UIL2ConnectionFactory. -
2. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 4, 2004 11:16 PM (in response to raja_chakraborty)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. -
3. Re: TopicConnectionFactory not bound !
adrian.brock Mar 5, 2004 5:11 AM (in response to raja_chakraborty)Those examples apply to 2.4.x
Use UIL2ConnectionFactory
Try the getting started guide it is much more up-to-date.
Regards,
Adrian -
4. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 5, 2004 6:23 AM (in response to raja_chakraborty)Hi Adrian,
Can you please tell me to run these examples do I need to run both the JBoss server as well as the JBossMQ separately?
I am asking you this because, if I run the JBoss server first and then run the JBossMQ later, it throws this exception saying that the NamingService couldnot be started at 1099 port. I think this is because this same port is also used by the JBoss server which I am starting first.
Also I am still getting the same exception of "TopicConnectionFactory not bound" evenif I use JBoss 2.4.10 version.
Please reply.
thanks
Biswajit. -
5. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 5, 2004 7:09 AM (in response to raja_chakraborty)Adrian,
Finally I wanted to ask if there is any file where we need to enter our JNDI mapping names for the TopicConnectionFactory or any resource we are using?
thanks
Biswajit. -
6. Re: TopicConnectionFactory not bound !
adrian.brock Mar 5, 2004 2:32 PM (in response to raja_chakraborty)The name should be ConnectionFactory in 2.4
I don't remember those examples, use grep to locate where it says TopicConnectionFactory
and change it.
JBossMQ was pretty bad in 2.4 (still beta software)
Regards,
Adrian -
7. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 7, 2004 11:10 PM (in response to raja_chakraborty)Adrian,
I am using JBoss 3.2.3 and JBossMQ 1.0.0-Beta-1. Do I still need to use ConnectionFactory instead of the TopicConnectionfactory? Are these 2 versions compatible with each other?
Also, can you please tell me do I need to run both the JBoss server as well as the JBossMQ separately to use JMS with JBoss?
I am asking you this because, if I run the JBoss server first and then run the JBossMQ later, it throws this exception saying that the NamingService couldnot be started at 1099 port. I think this is because this same port is also used by the JBoss server which I am starting first.
thanks and regds,
Biswajit. -
8. Re: TopicConnectionFactory not bound !
adrian.brock Mar 8, 2004 12:44 PM (in response to raja_chakraborty)You cannot run both together without changing port bindings.
Why are you running jbossmq-1.0beta?
JBoss-3.2.3 includes the much better JBossMQ-3.2
Regards,
Adrian -
9. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 9, 2004 12:26 AM (in response to raja_chakraborty)Adrian,
Yes I realized that JBoss 3.2.3 runs the JBossMQ 3.2 on its own.
Another thing I noticed was that when I was running the JBoss 3.2.3 server, I checked the server.log file under
C:\JBoss\jboss-3.2.3\server\default\log and I saw that the WebServer was running on 8083.
The message displayed on the server.log file was this :2004-03-09 11:11:48,263 INFO [org.jboss.web.WebService] Started WebServer with address: 0.0.0.0:8083
Now when i went to the browser and typedhttp://localhost:8083/jmx-console/index.html
it displayed a blank page, not the JMX Console atall.
I thought the JBoss server runs on port 8080 default, but the JMX Console is not shown even on port 8080.
Can you please explain why am I not displayed the JMX Console?
thanks n regds,
Biswajit. -
10. Re: TopicConnectionFactory not bound !
adrian.brock Mar 9, 2004 9:38 AM (in response to raja_chakraborty)8083 is the webserver for RMI classloading
Regards,
Adrian -
11. Re: TopicConnectionFactory not bound !
raja_chakraborty Mar 9, 2004 11:03 PM (in response to raja_chakraborty)Thanks Adrian...
Now when i went to the browser and typedhttp://localhost:8083/jmx-console/index.html
it displayed a blank page, not the JMX Console atall.
I have tried using the same with port 8080 also, but it showed a blank page again.Can you please explain why am I not displayed the JMX Console?
regds,
Biswajit.