
|
RdbDialect.java |
Description:
The JBoss Application Server shall access Rdb databases via the Rdb
JDBC driver.
JBoss uses another tool called "Hibernate", and this tool
has a setting called SQL
Dialect. There are many different dialects offered (like DB2, Oracle
9i, SQL Server,
MySQL et. al.).
The class RdbDialect.java provided through this note completes Hibernate
to set the
SQL dialect for Oracle Rdb.
Instructions:
Step 1:
Place your JDBC driver jar file named rdbThin.jar in the lib directory
under
the <hibernate installation directory>.
Step 2:
Copy the java file named RdbDialect.java to the src\org\hibernate\dialect
directory under the <hibernate installation directory>.
Step 3:
Edit hibernate.properties file in the src directory under the <hibernate
installation directory>.
By default it is specified as: - # hibernate.show_sql true Change
it to:
hibernate.show_sql true (Remove #) (so you can see the SQL generated).
Step 4:
Specify the correct values for database parameters, for example :
Dialect class
hibernate.dialect org.hibernate.dialect.RdbDialect
JDBC Driver
hibernate.connection.driver_class oracle.rdb.jdbc.rdbThin.Driver
URL
hibernate.connection.url jdbc:rdbThin://<node>:<port>/<database>
Username
hibernate.connection.username <JDBC_USER>
Password
hibernate.connection.password <JDBC_USER_PW>
Step 5:
Compiling Hibernate
In order to work with Hibernate, you need to download "ant"
(a portable make
tool). The "ant" utility is provided by Jakarta project
at Apache Software Foundation.
You will have to recompile Hibernate. From the hibernate-x.x.x directory
under
the <hibernate installation directory>, type "ant"
command on command prompt
and press Enter Key.
Type "ant junitreport test_output" on command prompt for
running hibernate test.
@ Do not remove this disclaimer.
PROOFREAD THIS SCRIPT BEFORE USING IT! Due to differences in the way
text
editors, e-mail packages, and operating systems handle text formatting
(spaces,
tabs, and carriage returns), this script may not be in an executable
state
when you first receive it. Check over the script to ensure that errors
of
this type are corrected.The script will produce an output file named
[outputfile].
This file can be viewed in a browser or uploaded for support analysis. |