Organizational Research By

Surprising Reserch Topic

Question:how to iBATIS Installation on machine?


 

 
Here are the simple steps you would need to carry out to install iBATIS on your Linux machine:
 
Download latest version of iBATIS from http://ibatis.apache.org/java.cgi
 
Unzip the downloaded file to extract .jar file from the bundle and keep it in appropriate lib directory.
 
Set PATH and CLASSPATH variables at the extracted .jar file(s) appropriately.
 
Here are the steps I carried out on my linux machine after downloading iBATIS binary file:
 
$ unzip ibatis-2.3.4.726.zip
  inflating: META-INF/MANIFEST.MF
   creating: doc/
   creating: lib/
   creating: simple_example/
   creating: simple_example/com/
   creating: simple_example/com/mydomain/
   creating: simple_example/com/mydomain/data/
   creating: simple_example/com/mydomain/domain/
   creating: src/
  inflating: doc/dev-javadoc.zip
  inflating: doc/user-javadoc.zip
  inflating: jar-dependencies.txt
  inflating: lib/ibatis-2.3.4.726.jar
  inflating: license.txt
  inflating: notice.txt
  inflating: release.txt
$pwd
/var/home/ibatis
$set PATH=$PATH:/var/home/ibatis/
$set CLASSPATH=$CLASSPATH:/var/home/ibatis\
                       /lib/ibatis-2.3.4.726.jar
 

asked Sep 13, 2013 in iBATIS by ashish singh
edited Sep 12, 2013
0 votes
22 views



Related Hot Questions

1 Answer

0 votes

 

Database Setup:
Create EMPLOYEE table in any MySQL database using the following syntax:
 
mysql> CREATE TABLE EMPLOYEE (
            id INT NOT NULL auto_increment,
            first_name VARCHAR(20) default NULL,
            last_name  VARCHAR(20) default NULL,
            salary     INT  default NULL,
            PRIMARY KEY (id)
        );
Create SqlMapConfig.xml
Consider the following:
 
We are going to use JDBC to access the database testdb.
 
JDBC driver for MySQL is "com.mysql.jdbc.Driver".
 
Connection URL is "jdbc:mysql://localhost:3306/testdb".
 
We would use username and password is "root" and "root".
 
Our sql statement mappings for all the operations would be described in "Employee.xml".
 
Based on the above assumption we have to create an XML configuration file with nameSqlMapConfig.xml with the following content. This is where you need to provide all configurations required for iBatis:
 
It is important that both the files SqlMapConfig.xml and Employee.xml should be present in the class path. For now we would keep Employee.xml file empty and we would conver its content in subsequent chapters.
 
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
 
     
     
       
         
               value="com.mysql.jdbc.Driver"/>
         
               value="jdbc:mysql://localhost:3306/testdb"/>
         
         
       
     
      
There are other optional properties which you can set using SqlMapConfig.xml file:
 
 
 
 
 
 
 
 
 
 
answered Sep 13, 2013 by ashish singh
edited Sep 12, 2013

...