ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt" <zkoppanyl...@intland.com>
Subject How to setup datasouce programmatically?
Date Fri, 16 Jun 2006 11:55:05 GMT
Hi,

In most cases we get the data-source from tomcat via JNDI. But we need to
make tests also without tomcat (thus without JNDI).

How can we do that programmatically? The ideal solution would be if I could
do something like below.

<!-- primary data-source --!>
<dataSource type="JNDI">
   <property name="DataSource"
     value="java:comp/env/jdbc/CodeBeamerDatasource"/>
</dataSource>

<!-- secondary data-source (if primary is not available) --!>
<dataSource type="SIMPLE">
  <property value="com.mysql.jdbc.Driver" name="JDBC.Driver" />
  <property value="..." name="JDBC.ConnectionURL" />
  <property value="..." name="JDBC.Username" />
  <property value="..." name="JDBC.Password" />
...
</dataSource>

Zsolt




Mime
View raw message