Java Reference
In-Depth Information
Installing i BATIS is a quick and simple process. Because it is a library, and not an
application, there is no installation process, but you do need to go through a few
steps to use i BATIS in your application.
If you are familiar with Java and JDBC , then you will probably read all you need
to get up and running in the next paragraph or two. Just in case, we provide an
overview of the process that you can read through, and then the rest of the chap-
ter gives more details on the installation process.
To get i BATIS , you have two choices. You can either download a binary distribu-
tion and unzip it into a directory, or check out a copy of the source from the Sub-
version repository and build it. In either case, you will have the same set of files
when you are done.
Once you have a build of the distribution, you simply need to add the required
JAR files to your application's classpath. If you are using JDK 1.4 or later, there are
only two required files:
ibatis-common-2.jar Shared i BATIS classes 1
ibatis-sqlmap-2.jar The i BATIS SQL mapping classes
Those two JAR files contain the most important i BATIS functionality and will be
enough for nearly any application that uses i BATIS . Notice that there are no
required dependencies on third-party libraries. This is intentional to avoid con-
flicts with various versions of other frameworks—a welcome benefit for anyone
who's been bitten by version conflicts in the past. There are optional JAR files that
enable certain features; these will be discussed later in this chapter.
That is all there is to it! You are now ready to start using i BATIS in your applica-
tion. If that was enough detail, you can skip ahead to section 3.3 to see if there are
any other dependencies you may need for other features in i BATIS , or you can
jump to section 3.6 and see how to configure i BATIS . If you need more informa-
tion, the next few sections go into greater detail.
3.1 Getting an iBATIS distribution
As we mentioned earlier, you have two choices for procuring an i BATIS distribu-
tion: you can download the ready-to-use prebuilt binary distribution or you can
get the source from the Subversion repository and build the distribution from
that. Both methods produce the same result—a finished distribution that can be
1
By the time you read this, the common jar file may be merged into a single JAR file with the sqlmap
classes, thus reducing the classpath requirement to a single JAR file and further simplifying deployment.
Search WWH ::




Custom Search