ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: How to setup datasouce programmatically?
Date Fri, 16 Jun 2006 14:14:03 GMT
I setup a mock JNDI context. It is pretty simple to do. If you email me
personally I will send you code for the JNDI mock.

Brandon

On 6/16/06, Zsolt <zkoppanylist@intland.com> wrote:
>
> 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