ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Simple DAO JDBC
Date Thu, 10 Feb 2005 17:00:50 GMT
I'm really not sure what you're doing here:

1) Are you using SimpleDataSource ("SIMPLE"), DBCP, or JNDI?  You've
mentioned all three.  If it's either of the latter two, your
<transactionManager> is incorrect (it's currently using
SimpleDataSource).

2) If you're using JNDI to access a DBCP resource in Tomcat's setup,
and you're trying to access it directly using a JNDI Context, then
your question is beyond the scope of iBATIS.

Can you clarify a little?

Clinton


On Thu, 10 Feb 2005 08:55:49 -0800 (PST), Roger Baeza
<rogerimo@yahoo.com> wrote:
> I'm trying to use Informix's
> ((IfmxStatement)stmt.getSerial() to retreive last
> inserted/update row into Database. But I am having
> problem with casting.
> I'm using Tomcat 5.54, JDK 1.4.2, Informix JDBC 2.21
> Here's my code:
> 
>      Connection conn = getConnection(); //using JNDI
> connection in Tomcat
>      Statement stmt = conn.createStatement();
>      stmt.executeUpdate("INSERT INTO jsp_name
> values(0,'TESTNAME','TESTDESC')");
>      int key = ((IfmxStatement)stmt).getSerial();
>      out.println(">"+key);
> 
> I configure as follow
> 
> <transactionManager type="JDBC" commitRequired="true">
>     <dataSource type="SIMPLE">
>       <property value="${driver}" name="JDBC.Driver"/>
>       <property value="${url}"
> name="JDBC.ConnectionURL"/>
>       <property value="${username}"
> name="JDBC.Username"/>
>       <property value="${password}"
> name="JDBC.Password"/>
>       <property value="15"
> name="Pool.MaximumActiveConnections"/>
>       <property value="15"
> name="Pool.MaximumIdleConnections"/>
>       <property value="1000" name="Pool.MaximumWait"/>
>     </dataSource>
>   </transactionManager>
> 
> What do I have to do with Tomcat's DBCP to get this
> working??? what do I have to get this working?
> 
> 
> __________________________________
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
>

Mime
View raw message