Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6276

JmsConnectionRequestInfo needs have defaults set before doing allocateConnection()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-5.1.0.Beta1
    • JBossAS-4.2.3.GA, JBossAS-5.0.0.CR2
    • JCA service
    • None
    • Workaround Exists
    • Hide

      WORKAROUND 1

      Use <security-domain>xxx</security-domain>
      instead of <security-domain-and-application/> to ignore the ConnectionRequestInfo when doing the subpooling.

      WORKAROUND 2

      Set the ClientID on the real connection factory rather than the jca connection factory,

      e.g. for JBoss Messaging you pass the client id into the constructor like this:

      <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
      name="jboss.messaging.connectionfactory:service=MyConnectionFactory"
      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
      <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
      <depends>jboss.messaging:service=PostOffice</depends>
      <constructor>
      <arg type="java.lang.String" value="MyClientID" />
      </constructor>

      <attribute name="JNDIBindings">
      <bindings>
      <binding>JndiName</binding>
      </bindings>
      </attribute>
      </mbean>

      Show
      WORKAROUND 1 Use <security-domain>xxx</security-domain> instead of <security-domain-and-application/> to ignore the ConnectionRequestInfo when doing the subpooling. WORKAROUND 2 Set the ClientID on the real connection factory rather than the jca connection factory, e.g. for JBoss Messaging you pass the client id into the constructor like this: <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory" name="jboss.messaging.connectionfactory:service=MyConnectionFactory" xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends> <depends>jboss.messaging:service=PostOffice</depends> <constructor> <arg type="java.lang.String" value="MyClientID" /> </constructor> <attribute name="JNDIBindings"> <bindings> <binding>JndiName</binding> </bindings> </attribute> </mbean>

    Description

      The default values for the JmsConnectionRequestInfo are being setup too late
      for the subpooling to work properly.

      The call to JmsConnectionRequestInfo.setDefaults(...)
      needs to be moved to JmsSessionFactoryImpl::allocateConnection()

      something like:

      JmsConnectionRequestInfo info = new JmsConnectionRequestInfo(transacted, acknowledgeMode, sessionType);
      info.setUserName(userName);
      info.setPassword(password);
      info.setClientID(clientID);
      + info.setDefaults(mcf.mcfProperties);

      This shows up if you try to configure the clientID property on the jms resource adapter, e.g.
      <config-property name="ClientID" type="java.lang.String">xxx</config-property>

      Attachments

        Issue Links

          Activity

            People

              jpederse@redhat.com Jesper Pedersen
              adrian.brock Adrian Brock (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: