I have having problems connecting a MDB to our EMS server I have followed the 
instructions on the wiki http://www.jboss.org/community/docs/DOC-10053. I am 
getting the following error.

  | 2009-01-02 09:39:31,984 DEBUG 
[org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] Got dlq 
connection factory 
QueueConnectionFactory[URL=tcp://192.9.215.112:7422,tcp://192.9.208.112:7422;clientID=null
 from IntQueueConnectionFactory
  | 2009-01-02 09:39:31,984 DEBUG 
org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler] Attempting to 
create queue connection with user null
  | 2009-01-02 09:39:35,000 ERROR 
[org.jboss.resource.adapter.jms.inflow.JmsActivation] Unable to reconnect 
org.jboss.resource.adapter.jms.inflow.jmsactivations...@11258b2(ra=org.jboss.resource.adapter.jms.jmsresourceadap...@16827b5
 destination=topic.cogwmp.svcs.shared.addr.> isTopic=true tx=true durable=false 
  | reconnect=10 provider=java:/TIBCOJMSProvider user=admin pass=<not shown> 
maxMessages=1 minSession=1 maxSession=15
  |  keepAlive=60000 useDLQ=true 
DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler 
DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
  | javax.jms.JMSSecurityException: Failed to connect to any server at: 
tcp://192.9.215.112:7422,tcp://192.9.208.112:7422 [Error: invalid name or 
password: url that returned this exception = TCP://192.9.208.112:7422 ]

The problem as I see it is this, the configuration in the tibco-jms-ds.xml 
seems to work fine, it connects, JNDI seems to be fine, the problem is that 
when the MDB attempts to connect it is not passing the username and password in 
the connection to the EMS.  So consequently the Tibco EMS is saying that the 
anonymous connection is not authorized, if I allow anonymous connections on the 
EMS its work fine.  But this not something I can do on the production server.

The MDB is using EJB3 annotations, I saw that there are properties for user and 
password which I have tried setting but with no luck. Bellow is my ds.xml and 
MDB code, any help would be greatly appreciated.

Thanks
Dave

tibco-jms-ds.xml

  | 
  | <?xml version="1.0" encoding="UTF-8"?>
  | <connection-factories>
  |   <mbean code="org.jboss.jms.jndi.JMSProviderLoader"
  | name="org.jboss.jms.jndi:service=JMSProviderLoader,name=TibjmsProvider">
  |     <attribute name="ProviderName">TIBCOJMSProvider</attribute>
  |     <attribute 
name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
  |     <attribute name="FactoryRef">ConnectionFactory</attribute>
  |     <attribute name="QueueFactoryRef">IntQueueConnectionFactory</attribute>
  |     <attribute name="TopicFactoryRef">IntTopicConnectionFactory</attribute>
  |     <attribute name="Properties">     
  |        
java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory
  |        java.naming.factory.url.pkgs=com.tibco.tibjms.naming
  |        java.naming.provider.url=tcp://ems2:7422
  |        java.naming.security.principal=admin
  |        java.naming.security.credentials=password
  |     </attribute>
  |   </mbean>
  |   
  |   <mbean code="org.jboss.naming.NamingAlias"
  |             
name="DefaultDomain:service=NamingAlias,fromName=ConnectionFactory">
  |     <attribute name="ToName">tibjmsnaming://ems2/QueueConnectionFactory
  |     </attribute>
  |     <attribute name="FromName">ConnectionFactory</attribute>
  |   </mbean>
  | 
  |   <tx-connection-factory>
  |     <jndi-name>TibcoEMS</jndi-name>
  |     <rar-name>jms-ra.rar</rar-name>
  |     
<connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
  |     <config-property name="SessionDefaultType" 
type="java.lang.String">javax.jms.Queue</config-property>
  |     <config-property name="JmsProviderAdapterJNDI" 
type="java.lang.String">java:/TIBCOJMSProvider</config-property>
  |     <max-pool-size>20</max-pool-size>
  |     
<security-domain-and-application>TibcoEMSRealm</security-domain-and-application>
  | 
  |         <config-property name="UserName" 
type="java.lang.String">admin</config-property>
  |         <config-property name="Password" 
type="java.lang.String">password</config-property>
  | 
  |   </tx-connection-factory>
  |   
  |  <!-- ==================================================================== 
--> 
  | </connection-factories>
  | 
  | 
TestMDB.java

  | 
  | public @MessageDriven(name = "TestMDB", activationConfig = {
  |             @ActivationConfigProperty(propertyName = "destinationType", 
propertyValue = "javax.jms.Topic"),
  |             @ActivationConfigProperty(propertyName = "destination", 
propertyValue = "topic.cogwmp.svcs.shared.addr.>"),
  |             
@ActivationConfigProperty(propertyName="user",propertyValue="admin"),
  |             
@ActivationConfigProperty(propertyName="password",propertyValue="password"),    
  |             @ActivationConfigProperty(
  |                             propertyName="providerAdapterJNDI",
  |                             propertyValue="java:/TIBCOJMSProvider")         
                
  |                             })
  |                             class TestMDB implements MessageListener {
  | 
  |     private static final Log logger = LogFactory.getLog(TestMDB.class);
  |     public void onMessage(Message arg0) {
  |             TextMessage txtMsg = (TextMessage)arg0;
  |             
  |             
  |                     try {
  |                             logger.info("Msg is "+ txtMsg.getText());
  |                     } catch (JMSException e) {
  |                             // TODO Auto-generated catch block
  |                             e.printStackTrace();
  |                     }
  |                     
  |     }
  | 
  | }

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201625
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to