JBoss Community

Re: Data sources in EAR on AS7?

created by henk de boer in JBoss AS 7 Development - View the full discussion

It's now final, data sources and JMS "queues" (I'm guessing destinations in general) can be deployed as part of the application or stand-alone:

Jaikiran wrote:

 

The datasource file is expected to end with the -ds.xml suffix, like in previous JBoss AS releases. You can place the *-ds.xml file in the JBOSS_HOME/standalone/deployments folder or even package it in the application under the META-INF folder of the application. If it's a .war application, then the *-ds.xml is expected to be right under the WEB-INF folder of the .war.

See: http://planet.jboss.org/post/jboss_as_7_1_0_final_thunder_released_java_ee_6_full_profile_certified

 

This is really great! Thanks to both the JBoss developers for implementing this and to all the community members that fought so hard to get this feature back in.

 

For me personally, I still need something akin to jboss-app.xml, so I can parameterize via an environment variable which data source is actually going to be used:

 

 

<jboss-app>
   <module>
          <service>res/${app.stage}/database-ds.xml</service>
  </module>
</jboss-app>


 

With this I can start up JBoss with e.g. -Dapp.stage=beta. Works absolutely great on JBoss AS 5 and 6. Is there anything like this on AS 7?

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community