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&...]