Hello -
In http://www.jboss.org/online-manual/HTML/ch06s07.html
It says -
[2.4.1. Follow the link to Service=Server under JBossMQ and fill in either the form field createTopic or the form field createQueue.]
I cannot find Service=Server.
I have tried editing the jms-service files and the result is -
javax.naming.NameNotFoundException: chat not bound
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source
my code is the following -
// Populate with needed properties
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "localhost:1099");
props.put("java.naming.rmi.security.manager", "yes");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
InitialContext context = new InitialContext(props);
// Lookup a JMS connection factory
// Get the connection factory
TopicConnectionFactory topicFactory =
(TopicConnectionFactory)context.lookup("ConnectionFactory");
// Create a JMS connection
topicConnection =
topicFactory.createTopicConnection();
// Create a JMS session object
TopicSession pubSession =
topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
TopicSession subSession =
topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
// Lookup a JMS topic
Topic chatTopic = (Topic)context.lookup("topic/"+topicName);
// Create a JMS publisher and subscriber
TopicPublisher publisher =
pubSession.createPublisher(chatTopic);
TopicSubscriber subscriber =
subSession.createSubscriber(chatTopic);
// Set a JMS message listener
subscriber.setMessageListener(this);
// Intialize the Chat application
set(topicConnection, pubSession, subSession, publisher, username);
// Start the JMS connection; allows messages to be delivered
topicConnection.start();
Thank you for you help,
Scott