4 Replies Latest reply on Sep 12, 2003 3:27 AM by Adrian Brock

    How to supply sign-on information

    Michael Lipp Newbie

      Hello,

        • 1. Re: How to supply sign-on information
          Michael Lipp Newbie

          [Sorry, forgot something]

          Hello,

          how can I supply the sign-on information to access a JMS resource? The J2EE specification states that this is implementation dependant (EJB2.0 para 20.4.2), so I looked at the JBoss way.

          For JDBC rsources things are quite obvious. The specification of the resource (the data source) includes the possibility to supply username and password.

          But what do I have to do in the case of JMS? Username and password are needed when I want to create a connection using the connection factory that I have retrieved from JNDI. With container managed authentication, I expect the container to somehow intercept my call to fac.createQueueConnection() and map it to a call to fac.createQueueConnection(username,password) adding the credentials I have supplied. However, I find neither a way to add default credentials to the connection factories configured in jbossmq-service.xml nor do I find a "wrapper mbean" that maps as I have described and delegates to a wrapped "standard" connection factories.

          Am I doing something wrong? Is container managed authentication not supported?

          Regards,

          Michael

          • 2. Re: How to supply sign-on information
            Adrian Brock Master

            Look at jms-ds.xml connection factory java:/JmsXA
            The securtiy domain is configured in conf/login-config.xml
            (default is guest/guest)

            Regards,
            Adrian

            • 3. Re: How to supply sign-on information
              Michael Lipp Newbie

              Sorry, but I'm too stupid. What I have understood so far is:

              (1) jms-ds.xml is run through the ConnectionFactoryTemplate.xsl and causes an MBean jboss.jcaname=JmsXA,service=TxCM of type TxConnectionManager to be created.

              (2) Due to some miracle, this mbean has its attribute ManagedConnectionFactory set to an instance of org.jboss.resource.adapter.jms.JmsManagedConnectionFactory (how does it do this? it cannot be derived from jms-ds.xml and it is not in the stylesheet).

              (3) In addition, I get an MBean jboss.mq:service=JMSProviderLoader,name=JBossMQProvider and an MBean jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool

              ... and now I still do not know where I can provide a username and password that is used by default when I create a JMS connection. It does not help to know that the created JCA resources uses the JmsXaReal to verify the credentials, I need to know where I can configure the credentials in the server.

              - Michael


              • 4. Re: How to supply sign-on information
                Adrian Brock Master

                Most of the settings come from the rar.
                The -ds.xml just deploys an instance of the rar.

                On of the tags <security-domain> says to use JmsXARealm

                Regards,
                Adrian