I have made some changes. I realized that when I publish messages, I am doing that in a XA context so I needed to change the login configuration for JmsXARealm too.
| <application-policy name = "JmsXARealm"> | <authentication> | <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule" | flag = "required"> | <module-option name = "unauthenticatedIdentity">guest</module-option> | <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option> | <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option> | </login-module> | </authentication> | </application-policy> | The module-option-name for managedConnectionFactoryName does not make any difference, i.e. the same behavior with or without. I did not include it first time as I don't think I need it but that I thought I'd try it anyway. Now the code is no longer executing fine but is giving me a SecurityException when I create the TopicSession: | TopicConnection connection = this.getTopicConnectionFactory(initialContext).createTopicConnection(userName, password); | TopicSession session = connection.createTopicSession(true, TopicSession.AUTO_ACKNOWLEDGE); The exception is: | javax.jms.JMSException: Could not create a session: javax.resource.spi.SecurityException: No Passwdord credentials found | at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:392) | at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createTopicSession(JmsSessionFactoryImpl.java:155) | at com.bluespace.core.implementation.jms.JMSFacadeDefaultImplementation.createTopicSession(JMSFacadeDefaultImplementation.java:44) | at com.bluespace.core.implementation.jms.JMSFacadeDefaultImplementation.getTopicPublisherResources(JMSFacadeDefaultImplementation.java:195) | at com.bluespace.core.implementation.jms.JMSFacadeDefaultImplementation.getTopicPublisherResources(JMSFacadeDefaultImplementation.java:71) | at com.bluespace.core.implementation.events.publishers.abstracts.BlueSpacePublisherBean.publishOnTopics(BlueSpacePublisherBean.java:137) | at com.bluespace.core.implementation.events.publishers.abstracts.BlueSpacePublisherBean.publish(BlueSpacePublisherBean.java:100) | at com.bluespace.core.implementation.events.publishers.abstracts.BlueSpacePublisherBean.publish(BlueSpacePublisherBean.java:74) | at com.bluespace.core.implementation.events.publishers.mailbox.ReadMailPublisherBean.publish(ReadMailPublisherBean.java:55) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | ... | The username and password that I am providing is "pspub" and "bspub" which is defined in jbossmq-state.xml as you can see in my previous post. Again, what am I missing here? Many thanks, Rudi View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908662#3908662 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908662 ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
