public class TemporaryJDBC extends Object
getTemporaryDerbyJDBC()
creates a temporary directory that is used
to construct the JDBC connection string for a local Derby database.
This is most useful from a spring configuration, for example when using
InterpolatingDriverManagerDataSource
:
<!-- Apache Derby rooted at a temporary directory --> <bean id="t2reference.jdbc.temporaryjdbc" class="org.apache.taverna.platform.spring.jdbc.TemporaryJDBC"> </bean> <bean id="t2reference.jdbc.url" class="java.lang.String" factory-bean="t2reference.jdbc.temporaryjdbc" factory-method="getTemporaryDerbyJDBC" /> <bean id="t2reference.jdbc.datasource" class="org.apache.taverna.platform.spring.jdbc.InterpolatingDriverManagerDataSource"> <property name="driverClassName"> <value>org.apache.derby.jdbc.EmbeddedDriver</value> </property> <property name="url"> <ref bean="t2reference.jdbc.url" /> </property> <property name="repository"> <ref bean="raven.repository" /> </property> <property name="driverArtifact"> <value>org.apache.derby:derby:10.4.1.3</value> </property> </bean>
Constructor and Description |
---|
TemporaryJDBC() |
public String getTemporaryDerbyJDBC() throws IOException
IOException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.