[jboss-as7-dev] Local database file connection urls

Jesper Pedersen jesper.pedersen at jboss.org
Mon Jun 6 13:55:38 EDT 2011


On Monday, June 06, 2011 01:44:46 PM Scott Stark wrote:
> In the
> http://community.jboss.org/wiki/DataSourceConfigurationInAS7#Defining_the_D
> ataSource_itself section I don't see an example of setting up a local
> database with a backing store. Looking at the
> org.jboss.as.connector.subsystems.datasources code, I don't see any
> reference to the usual relativeTo attribute, or an attempt to expand
> jboss.* properties. It seems like something like the following needs to
> be supported with the datasource element handling property expansion:
> 
> <subsystem xmlns="urn:jboss:domain:datasources:1.0">
> <datasources>
> <datasource jndi-name="java:/H2DS" pool-name="H2DS" enabled="true"
> use-java-context="true"
>                          relativeTo="jboss.server.data.dir">
> <connection-url>
> 
> jdbc:h2:file:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1
> </connection-url>
> ...

Don't use H2 for anything serious. The ${} expansion will work even though it 
is undocumented.

Best regards,
 Jesper


More information about the jboss-as7-dev mailing list