ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Leyba" <xle...@gmail.com>
Subject How commit works
Date Tue, 05 Sep 2006 13:44:52 GMT

I've defined my sqlmaps with

<transactionManager type="JDBC">
                <dataSource type="JNDI">
                        <property name="context.java.naming.factory.initial"

value="org.jnp.interfaces.NamingContextFactory" />
                        <property name="context.java.naming.provider.url"
                                value="jnp://localhost:2199" />
                        <property name="context.java.naming.factory.url.pkgs"
                                value="org.jboss.naming:org.jnp.interfaces" />
                        <property name="DataSource"
                                value="java:comp/env/jdbc/MySQLDB" />
                        <property name="JDBC.DefaultAutoCommit" value="false" />

and in my program I did:

try {
			sqlMap = NotificationsSqlConfig.getSqlMapInstance();
			gr = (GenericResult) sqlMap.queryForObject("insertSourceType", sourceTypeId);
		} catch (Exception e) {
			logger.error("insertSourceType(String)", e); //$NON-NLS-1$
			throw new RemoteException(e.getMessage(),e);
		} finally {
			try {
			} catch (Exception e) {
				throw new RemoteException(e.getMessage(),e);

to call a storedProcedure.

The stored procedure return me 1 row affected but data is never inserted in DB.

But, if I call stored procedure from a sql console it work well.

Is there something I forget in my config ?

Thanks in advance


View raw message