9 Replies Latest reply on May 26, 2008 10:58 PM by Vicky Kak

    Bug/Missing feature in XA-DS.xml

    Shrinivas Joshi Newbie

      If max-pool-size is not specified and only min-pool-size is specified then max-pool-size should be set => min-pool-size whereas it defaults to 20 rendering min-pool-size setting of no use.

      I hope I am not missing something here.

      Thanks,
      -Shrinivas

        • 1. Re: Bug/Missing feature in XA-DS.xml
          Weston M. Price Master

          Add a feature request in JIRA. I will take care of it.

          • 3. Re: Bug/Missing feature in XA-DS.xml
            Vicky Kak Master

            I have gone with the different approach , here it goes .
            I have modified the ConnectionFactoryTemplate.xsl. I have made the following changes
            Changed

            <xsl:choose>
             <xsl:when test="max-pool-size">
             <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
             </xsl:when>
             <xsl:otherwise>
             <attribute name="MaxSize">20</attribute>
             </xsl:otherwise>
             </xsl:choose>


            to

            <xsl:variable name="maxPoolCount"><xsl:value-of select="max-pool-size"/></xsl:variable>
             <xsl:variable name="minPoolCount"><xsl:value-of select="min-pool-size"/></xsl:variable>
             <xsl:choose>
             <!-- max-pool-size entry is there in the -ds.xml file -->
             <xsl:when test="max-pool-size">
             <xsl:choose>
             <!-- min pool size is present -->
             <xsl:when test="min-pool-size">
             <xsl:choose>
             <xsl:when test="$maxPoolCount>$minPoolCount">
             <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
             </xsl:when>
             <xsl:otherwise>
             <attribute name="MaxSize"><xsl:value-of select="min-pool-size"/></attribute>
             </xsl:otherwise>
             </xsl:choose>
             </xsl:when>
             <!-- min pool size is absent -->
             <xsl:otherwise>
             <attribute name="MaxSize"><xsl:value-of select="max-pool-size"/></attribute>
             </xsl:otherwise>
             </xsl:choose>
             </xsl:when>
            
             <!-- max-pool-size entry is not there in the -ds.xml file -->
             <xsl:otherwise>
             <xsl:choose>
             <!-- min-pool-size is present -->
             <xsl:when test="min-pool-size">
             <xsl:choose>
             <xsl:when test="20 >= $minPoolCount">
             <attribute name="MaxSize">20</attribute>
             </xsl:when>
             <xsl:otherwise>
             <attribute name="MaxSize"><xsl:value-of select="min-pool-size"/></attribute>
             </xsl:otherwise>
             </xsl:choose>
             </xsl:when>
             <!-- min-pool-size is absent -->
             <xsl:otherwise>
             <attribute name="MaxSize">20</attribute>
             </xsl:otherwise>
             </xsl:choose>
             </xsl:otherwise>
             </xsl:choose>




            • 4. Re: Bug/Missing feature in XA-DS.xml
              Weston M. Price Master

              The *-ds.xml mechanism for deployment is being deprecated for 5.0, so this will not work.

              • 5. Re: Bug/Missing feature in XA-DS.xml
                Jay L Newbie

                What happens when BOTH the min and max pool sizes are omitted? What does the connection pool use as a default?

                Thanks!
                -Xander

                • 6. Re: Bug/Missing feature in XA-DS.xml
                  Peter Johnson Master

                  *-ds.xml is being deprecated??? Any links to docs on what the new mechanism is? Is the new mechanism available in beta4? And if so, why is DefaultDS still define using hsqldb-ds.xml? And the docs/examples/jca directory still full of *-ds.xml files?

                  • 7. Re: Bug/Missing feature in XA-DS.xml
                    Peter Johnson Master

                    Just now noticed that Weston's post was last year, not last month. So the question is - is it still true? Is *-ds.xml being deprecated?????

                    • 8. Re: Bug/Missing feature in XA-DS.xml
                      Vicky Kak Master

                       

                      "PeterJ" wrote:
                      Just now noticed that Weston's post was last year, not last month. So the question is - is it still true? Is *-ds.xml being deprecated?????


                      -ds.xml is not deprecated , the XSLT deployment process is deprecated which can been seen from the jboss-5.0.0.CR1\server\default\deployers\jboss-jca.deployer\META-INF\jca-deployers-beans.xml

                      <bean name="JCAMetaDataRepository" class="org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository"/>
                      
                       <!-- RAR Deployment -->
                       <bean name="RARParserDeployer" class="org.jboss.resource.deployers.RARParserDeployer">
                       <property name="metaDataRepository"><inject bean="JCAMetaDataRepository"/></property>
                       <property name="type">rar</property>
                       </bean>
                      
                       <bean name="RARDeployer" class="org.jboss.resource.deployers.RARDeployer">
                       <property name="workManagerName">jboss.jca:service=WorkManager</property>
                       <property name="XATerminatorName">jboss:service=TransactionManager</property>
                       <property name="type">rar</property>
                       </bean>
                      
                      
                      
                       <!-- ConnectionFactory Deployment - ->
                      
                       <bean name="ConnectionFactoryDeployer" class="org.jboss.system.deployers.ServiceXSLDeployer">
                       <property name="suffix">-ds.xml</property>
                       <property name="XSLPath">stylesheets/ConnectionFactoryTemplate.xsl</property>
                       <property name="type">jca-ds</property>
                       </bean>
                      
                       -->


                      You can notice that XSLDeployer(ConnectionFactoryDeployer) is deprecated and the RARParserDeployer/RARDeployer is used .



                      • 9. Re: Bug/Missing feature in XA-DS.xml
                        Vicky Kak Master

                         

                        "xanderv" wrote:
                        What happens when BOTH the min and max pool sizes are omitted? What does the connection pool use as a default?

                        Thanks!
                        -Xander


                        It is defaulted to 0 and 10 but this configuration is taken from the xslt , it is available in the MetaData object now .
                        Prior Jboss5 the -ds.xml used to get converted to the the xml( containing Mbean's) , this was done using the XSLT transformation.

                        Now you don't use XSLT transformation and all the default values are available in the MetaData code .

                        Go to the jmx-console and verify what values are taken for min/max pool size if you don't define it .