ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt" <zkoppanyl...@intland.com>
Subject RE: How to setup datasouce programmatically?
Date Mon, 19 Jun 2006 10:57:07 GMT
Brandon,

 

can you send me the code for JNDI mock?

 

Zsolt

 

  _____  

From: Brandon Goodin [mailto:brandon.goodin@gmail.com] 
Sent: Friday, June 16, 2006 4:14 PM
To: user-java@ibatis.apache.org
Subject: Re: How to setup datasouce programmatically?

 

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