[jboss-user] [Installation, Configuration & DEPLOYMENT] - System properties not replaced in ds.xml when propertiesserv

gjeudy do-not-reply at jboss.com
Thu Aug 20 11:34:40 EDT 2009


I'm using JBoss 4.2.2, I'm trying to leverage the system properties service. My deployment model is as follows

      -------- jboss-service.xml (declares properties service mbean)
      --------- *-ds.xml (declares datasource with properties ${connection.url}
      --------- other archives

the jboss-service.xml and *-ds.xml are declared in the jboss-app.xml, I  use <module-order>strict</module-order> with the jboss-service.xml declared before everything else.

Nevertheless I get runtime errors, apparently the property interpolation failed even though the system properties service was deployed before everything else inside the EAR.

  | <jboss-app>
  |   <loader-repository>com.archinsurance:loader=rdm</loader-repository>
  |   <module-order>strict</module-order>
  |   <module>
  |     <service>jboss-service.xml</service>
  |   </module>
  |   <module>
  |     <service>rdm-wsmq-ds.xml</service>
  |   </module>
  |   <module>
  |     <service>rdm-ds-</service>
  |   </module>
  | </jboss-app>

Caused by: org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: ${rdm.ds.connection.url}
  | 	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:290)
  | 	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:170)
  | 	... 158 more

if the properties service is loaded directly in properties-service.xml file in deploy dir things behave normally and the datasources load fine from the EAR.

Can somebody enlighten me? I deploy several apps in the same jboss instance and I want each app to deploy its own properties service, that is why I make it part of the EAR but this approach doesn't work. Ideally I would like the property replacement to be scoped per EAR but I haven't found anything to support this. The workaround I use is a separate property namespace per application so that there is no property clash in the common system properties in the VM.

Please advise,

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250689#4250689

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250689

More information about the jboss-user mailing list