ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Calling PL/PGSQL doesn't work?
Date Thu, 21 Jul 2005 14:42:33 GMT
Set <transactionManager ... commitRequired="true">

This will force even queries to be committed.

Larry


On 7/21/05, Hendry <hendry.hu@elasitas.com> wrote:
> Hi, I'm new to iBatis, I got stuck when calling functions in PostgreSQL 8
> using SqlMap. Here is the part of my xml:
> 
> <parameterMap id="msg-param" class="msg">
>         <parameter property="id" mode="IN" />
>         <parameter property="msg" mode="IN" />
>         <parameter property="charged" mode="IN" />
> </parameterMap>
> <procedure id="spEntrySender" parameterMap="msg-param"
> resultClass="java.lang.String">
> {call spEntrySender(?, ?, ?)}
> </procedure>
> 
> And here how I call it from my application:
> String m = (String) sqlMap.queryForObject("spEntrySender", msg);
> 
> The problem is, the data not inserted to database. But if I input the data
> manually, the id column which should be incremented by 1 is incremented more
> than 1, as if it has been inserted data before.
> 
> I already tried using CallableStatement directly, and it works. And also,
> I've look at the log file, and it hasn't any error. This is part of the log
> file:
> 
> [21/07/2005 16:04:28] {conn-100014} Connection
> [21/07/2005 16:04:28] {pstm-100015} PreparedStatement: SELECT
> spEntrySender(?, ?, ?) AS result
> [21/07/2005 16:04:28] {pstm-100015} Parameters: [1963, tanya, 1]
> [21/07/2005 16:04:28] {pstm-100015} Types: [java.lang.Integer,
> java.lang.String, java.lang.Integer]
> [21/07/2005 16:04:28] {rset-100016} ResultSet
> [21/07/2005 16:04:28] {rset-100016} Header: [result]
> [21/07/2005 16:04:28] {rset-100016} Result: [OK]
> [21/07/2005 16:04:28] Returned connection 22048196 to pool.
> [21/07/2005 16:04:28] Checked out connection 22048196 from pool.
> 
> I've searched the net for solutions of this problem, and still couldn't find
> any. Could someone help me out?
> 
> Thanx.
> 
>

Mime
View raw message