Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-1464

Port [JBAS-6276] - JmsConnectionRequestInfo needs have defaults set before doing allocateConnection()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.2.0.GA_CP05, 4.3.0.GA_CP03
    • JCA
    • 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

              rhn-support-jhowell William Howell
              rhn-support-jhowell William Howell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: