"Jeff Butler" <[EMAIL PROTECTED]> 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!
:)
