[jboss-user] [IronJacamar] - The replacement of system properties in *-ds.xml is done only for elements of string value type

Radim Hanus do-not-reply at jboss.com
Mon Jan 3 07:04:29 EST 2011


Radim Hanus [http://community.jboss.org/people/rhanus] created the discussion

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

To view the discussion, visit: http://community.jboss.org/message/578115#578115

--------------------------------------------------------------
h3. synopsis
* 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
h3. 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:
*  http://community.jboss.org/message/296436#296436 http://community.jboss.org/message/296436#296436
*  https://issues.jboss.org/browse/JBPAPP-4539 https://issues.jboss.org/browse/JBPAPP-4539
*  https://issues.jboss.org/browse/JBAS-8344 https://issues.jboss.org/browse/JBAS-8344
*  https://issues.jboss.org/browse/JBJCA-263 https://issues.jboss.org/browse/JBJCA-263
h3. 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
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578115#578115]

Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110103/657d8373/attachment.html 


More information about the jboss-user mailing list