Thanks! It works well after "topic/beginner" is used.
Peter Antman wrote:
>
> On 21 Jun, Roy Yip wrote:
> > Hi!
> >
> > I'm trying out the Chat example from O'Reilly's JMS text. I've
> > configured the jbossmq.xml file to include :-
> >
> > ...
> > <Topic><Name>beginner</Name></Topic>
> >
> > and
> >
> > <User>
> > <Name>myname</Name>
> > <Password>mypassword</Password>
> > </User>
> >
> > and the source is :-
> >
> > ...
> > Properties env = new Properties();
> > env.setProperty("java.naming.factory.initial",
> > "org.jnp.interfaces.NamingContextFactory");
> > env.setProperty("java.naming.provider.url", "localhost:1088");
> > InitialContext jndi = new InitialContext(env);
> > TopicConnectionFactory conFactory =
> > (TopicConnectionFactory)jndi.lookup("TopicConnectionFactory");
> > TopicConnection connection =
> > conFactory.createTopicConnection(username, password);
> > TopicSession pubSession = connection.createTopicSession(false,
> > Session.AUTO_ACKNOWLEDGE);
> > TopicSession subSession = connection.createTopicSession(false,
> > Session.AUTO_ACKNOWLEDGE);
>
> ---> String topicName = "topic/beginner"
>
> //Peter
> > Topic chatTopic = (Topic)jndi.lookup(topicName);
> >
> > When I run it with all required classpath set, the outcome is :-
> >
> >>java Chat beginner myname mypassword
> >
> > javax.naming.NameNotFoundException: beginner not bound at
> > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
> > Source)
> > ...
> >
> > It seems "beginner" in jbossmq.xml is not bound into JNDI registry and I
> > cannot find the DTD for jbossmq.xml.
> >
> > Can anyone help?
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> --
> Jobba hos oss: http://www.tim.se/weblab
> ------------------------------------------------------------
> Peter Antman Technology in Media, Box 34105 100 26 Stockholm
> Systems Architect WWW: http://www.tim.se
> Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
> Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
> ------------------------------------------------------------
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user