1 2 Previous Next 18 Replies Latest reply on May 10, 2013 9:22 PM by Karthick Narayanan

    The replacement of system properties in *-ds.xml is done only for elements of string value type

    Radim Hanus Expert


      • enterprise application deployed in jboss-5.1
      • would like to use <max-pool-size>${myapp.db.maxPoolSize}</max-pool-size> in myapp.ear/my-ds.xml
      • ends up with maxPoolSize == 0

      story behind

      I encountered this problem while staging my ear from devel to loadtests and then production usage
      I had an idea I would use a parameter for max-pool-size attribute and set it in accompanying property-service.xml so that I would have one deployment and several property-service.xml files based on target environment but it ends up with zero value of maxPoolSize


      I have searched the forum as well as issue tracker and found this problem as unresolved:

      suggested solution

      having some spare time during christmas I dived into connector source codes and hopefully found a non-invasive way how to solve it


      all magic is done in ManagedConnectionFactoryParserDeployer.parse() and it's matter of JAXB definitelly

      I suggest to define specific @XmlJavaTypeAdapter adapters for non-string "primitive" fileds (int, long, boolean, Boolean) of ManagedConnectionFactoryDeploymentMetaData

      These adapters in their unmarsal methods would call StringPropertyReplacer.replaceProperties() in accordance with PropertyEditorManager.findEditor()

      I tried to implement such a fix and it works for me but didn't run against testsuite yet


      BTW quick look at source codes for 6.0 final and prety sure there is the same problem

        1 2 Previous Next