To connect Altibase in iBatis, the user can set the Altibase JDBC Driver and specify the dataSource for Altibase in the SqlMapConfig file. This chapter section describes how to get the Altibase JDBC driver, how to set the JDBC Driver, and how to set the dataSource in SqlMapConfig. In addition, this section explains how to use the FailOver function, how to work with multiple versions of Altibase, and how to
call the stored procedureStored Procedure/functionFunction.
How to Get Altibase JDBC Driver
When calling the stored procedureStored Procedure/function Function created in DB in iBATIS, set the information on the parameter defined in the stored procedure Stored Procedure/ function Function in the SqlMap file, and in the <procedure> tag, call the procedureStored Procedure/function Function applied to CallableStatement applied to the tag. Just define it.
The following is an example of calling the stored procedureStored Procedure/functionFunction.
Ex) ProcedureSample Procedure/Function creation statement
Define the type and IN/OUT settings for the parameters of the procedureStored Procedure/function Function in the <paramaterMap> tag, and specify the id value of the <paramaterMap> tag in the parameterMap attribute in the <procedure> tag. Then, in the <procedure> tag, write a statement that calls Stored Procedure/Function.
To execute the ProcedureSample example, the Altibase.jar and ibatis-2.3.4.x.jar files are required, as in “Configuring a dataSource in the SqlMapConfig file to link with Altibase”.