Hi iam running Topicpublisher and creating a durableSubcriber(), iam gettign 
the following error when running the subcriber .. the code was pasted below 

public class TopicPublisherDemo
{
public static void main(String args[])
throws Exception
{

String jndi_name =
"org.jnp.interfaces.NamingContextFactory";

Properties p = new Properties();

p.put(Context.INITIAL_CONTEXT_FACTORY,jndi_name);

p.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming rg.jnp.interfaces");

p.put(Context.PROVIDER_URL, "localhost:1100");

Context ctx = new InitialContext(p);

Object obj = ctx.lookup("ConnectionFactory");

TopicConnectionFactory topicFactory =
( TopicConnectionFactory ) obj;

TopicConnection conn =
topicFactory.createTopicConnection();

conn.start();

TopicSession session =
conn.createTopicSession
(false, TopicSession.AUTO_ACKNOWLEDGE);

Topic  _topic = (Topic) ctx.lookup("topic/testDurableTopic");


TopicPublisher publisher =
session.createPublisher( _topic );

TextMessage txtMsg =
session.createTextMessage();

txtMsg.setText(args[0]);

publisher.publish(
txtMsg,
Message.DEFAULT_DELIVERY_MODE,
Message.DEFAULT_PRIORITY,
10000 );

System.out.println("Message Sent Successfully");

session.close();
conn.close();
}
}
ian getting the following error 


Exception in thread "main" javax.jms.JMSSecurityException: Connection not 
authorized to do durable subscription on topic: testDurableTopic
at 
org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:135)
at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:816)
at org.jboss.mq.server.JMSServerInvoker.subscribe(JMSServerInvoker.java:297)
at 
org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:166)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
at 
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:534)

can any one give solution to this problem 
i had configured the jndi name in jms-dx xml .

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3938060#3938060

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3938060


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to