1 Reply Latest reply on Feb 29, 2004 6:26 PM by Adrian Brock

    JBoss overrides user specified in createQueueConnection

    posselt Newbie

      Hi y'all,

      This concerns JBoss-3.2.3RC1 (should be the same in 3.2.3 final
      since the code didn't change)

      I wanted to remove my "guest" user and ran into an exception
      saying that "User: guest is NOT authenticated". The problem ist
      that I do NOT use user quest.

      I traced the JBoss code and found the username to be correct
      in the call to
      org/jboss/resource/adapter/jms/JmsManagedConnectionFactory.java
      Method createManagedConnection(...)

      It seems to me that the call to getInfo overrides my specified
      username with the default properties.

      My code:

      jndiContext = new InitialContext();
      queueFactory = (QueueConnectionFactory) jndiContext.lookup("java:/JmsXA");
      queueConnection = queueFactory.createQueueConnection(username, password);
      queueSession = queueConnection.createQueueSession(true, -1);

      The Exception:

      2004-02-26 16:59:01,974 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection:
      javax.resource.spi.CommException: javax.jms.JMSSecurityException: User: guest is NOT authenticated
      at org.jboss.resource.adapter.jms.JmsManagedConnection.setup(JmsManagedConnection.java:637)
      at org.jboss.resource.adapter.jms.JmsManagedConnection.(JmsManagedConnection.java:167)
      at org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.createManagedConnection(JmsManagedConnectionFactory.java:103)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:455)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:214)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:496)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:425)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:318)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createQueueSession(JmsSessionFactoryImpl.java:119)

      Any hints?

      Thanks,
      Dietmar