Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 5337 invoked from network); 27 Sep 2006 15:42:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Sep 2006 15:42:14 -0000 Received: (qmail 82947 invoked by uid 500); 27 Sep 2006 15:42:12 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 82937 invoked by uid 500); 27 Sep 2006 15:42:12 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 82926 invoked by uid 99); 27 Sep 2006 15:42:12 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Sep 2006 08:42:12 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=C.Zecca@ads.it; spf=permerror X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,NO_REAL_NAME Received-SPF: error (idunn.apache.osuosl.org: domain ads.it from 83.103.62.70 cause and error) Received: from [83.103.62.70] ([83.103.62.70:26404] helo=mailgateway.ads.it) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 16/40-28774-FCB9A154 for ; Wed, 27 Sep 2006 08:42:09 -0700 Received: from mail.ads.it (mercurio.finmatica.local [10.97.30.5]) by mailgateway.ads.it (Symantec Mail Security) with ESMTP id 227B7444002 for ; Wed, 27 Sep 2006 17:42:04 +0200 (CEST) In-Reply-To: Subject: Re: Stored procedures with no parameters (and no return data) To: user-java@ibatis.apache.org X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: C.Zecca@ads.it Date: Wed, 27 Sep 2006 17:41:56 +0200 X-MIMETrack: Serialize by Router on Mercurio/Minosse(Release 6.5.5|November 30, 2005) at 27/09/2006 17.41.56 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=4EBBFB65DFC6261D8f9e8a93df938690918c4EBBFB65DFC6261D" Content-Disposition: inline X-Brightmail-Tracker: AAAAAA== X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0__=4EBBFB65DFC6261D8f9e8a93df938690918c4EBBFB65DFC6261D Content-type: text/plain; charset=US-ASCII "Jeff Butler" scritti il 27/09/2006 16:29:30 > Hi Cesare, [...] > For your issue, remove the element, then code the > procedure elements like this (no results, no parameters): > > > {call ut_Tipo_Dato.ut_setup} > > > Then call it with the "update" method. I think that should do it. Thanks Jeff. It works! The new content for XML configuration file now is {call ut_Tipo_Dato.ut_setup} {call ut_Tipo_Dato.ut_teardown} As you recommended, the right way to call the no-arg no-ret-value procedure is based on the "update" method of SqlMapClient. Here is the Java code snippet public void setUp() throws SQLException { SqlMapClient lSqlMapClient = Configuration.getSqlMapInstance(); lSqlMapClient.update( "setUp", null ); } public void tearDown() throws SQLException { SqlMapClient lSqlMapClient = Configuration.getSqlMapInstance(); lSqlMapClient.update( "tearDown", null ); } Great! :) --0__=4EBBFB65DFC6261D8f9e8a93df938690918c4EBBFB65DFC6261D Content-type: text/html; charset=US-ASCII Content-Disposition: inline

"Jeff Butler" <jeffgbutler@gmail.com> scritti il 27/09/2006 16:29:30

> Hi Cesare,


[...]

> For your issue, remove the <parameterMap> element, then code the
> procedure elements like this (no results, no parameters):

>  
> <procedure id="setUp">
>   {call ut_Tipo_Dato.ut_setup}
> </procedure>

>  
> Then call it with the "update" method.  I think that should do it.

Thanks Jeff.
It works!

The new content for XML configuration file now is

    <sqlMap namespace="GPJ">

    <procedure id="setUp">
    {call ut_Tipo_Dato.ut_setup}
    </procedure>

    <procedure id="tearDown">
    {call ut_Tipo_Dato.ut_teardown}
    </procedure>

    </sqlMap>

As you recommended, the right way to call the no-arg no-ret-value procedure is based on the "update" method of SqlMapClient. Here is the Java code snippet


public void setUp() throws SQLException
{
     SqlMapClient lSqlMapClient = Configuration.getSqlMapInstance();
        lSqlMapClient.update( "setUp", null );
}

public void tearDown() throws SQLException
{
     SqlMapClient lSqlMapClient = Configuration.getSqlMapInstance();
        lSqlMapClient.update( "tearDown", null );
}


Great!
:) --0__=4EBBFB65DFC6261D8f9e8a93df938690918c4EBBFB65DFC6261D--