hello everybody i am new one in the field of
j2ee i am stuck up in the problem from the one week please help me
MY problem is that
i am using
jboss 4.0 jdk1.5, and msaccess database trying to run the example of bean managed persistence i am get stuck in the deployment of the bean the code for the bean is as follows:
THe following files for bean are
1 Account.java
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface Account extends EJBObject {
public void debit(double amount)
throws RemoteException;
public void credit(double amount)
throws InsufficientBalanceException,RemoteException;
public
String getFirstName()
throws RemoteException;
public String getLastName()
throws RemoteException;
public double getBalance()
throws RemoteException;
}
2)AccountHome.java
import java.util.Collection;
import java.rmi.RemoteException;
import javax.ejb.*;
public interface AccountHome extends EJBHome {
public Account create(String id, String firstName,
String lastName, double balance)
throws RemoteException, CreateException;
public Account findByPrimaryKey(String id)
throws FinderException, RemoteException;
public Collection findByLastName(String lastName)
throws FinderException, RemoteException;
public Collection findInRange(double low, double high)
throws FinderException, RemoteException;
}
3)AccountPK.java
public class AccountPk implements java.io.Serializable
{
/**
* Holds the primary key
*/
public int id;
/**
* Creates a new Portfolio Primary Key Object
*/
public AccountPk()
{
}
/**
* Creates and initializes a new Portfolio Primary Key Object
*/
public AccountPk( int id )
{
this.id = id;
}
/**
* From Serializable we must implement the hashCode method
* and provide a unique id for this class - let's use the
* primary key, it has to be unique!
*/
public int hashCode()
{
return id;
}
/**
* See if these objects are the same
*/
public boolean equals( Object obj )
{
if( obj instanceof AccountPk )
{
return( id == ( ( AccountPk )obj ).id );
}
return false;
}
}
4)AccountEJB.java
import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
import javax.naming.InitialContext;
import javax.naming.Context;
public class AccountEJB implements EntityBean {
public String id;
public String firstName;
public String lastName;
public double balance;
public EntityContext context;
public Connection con;
// public String dbName = "jdbc
dbc";
public String dbName = "java:/jdbc/MSAccessDS";
//public String jdbcURL=" "jdbc
dbc:"+args[0] ;
public void debit(double amount)
throws InsufficientBalanceException {
if (balance - amount < 0) {
throw new InsufficientBalanceException();
}
balance -= amount;
}
public void credit(double amount) {
balance += amount;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public double getBalance() {
return balance;
}
public String ejbCreate(String id, String firstName,
String lastName, double balance)
throws CreateException {
if (balance < 0.00) {
throw new CreateException
("A negative initial balance is not allowed.");
}
try {
insertRow(id, firstName, lastName, balance);
} catch (Exception ex) {
throw new EJBException("ejbCreate: " +
ex.getMessage());
}
this.id = id;
this.firstName = firstName;
this.lastName = lastName;
this.balance = balance;
return id;
}
public String ejbFindByPrimaryKey(String primaryKey)
throws FinderException {
boolean result;
try {
result = selectByPrimaryKey(primaryKey);
} catch (Exception ex) {
throw new EJBException("ejbFindByPrimaryKey: " +
ex.getMessage());
}
if (result) {
return primaryKey;
}
else {
throw new ObjectNotFoundException
("Row for id " + primaryKey + " not found.");
}
}
public Collection ejbFindByLastName(String lastName)
throws FinderException {
Collection result;
try {
result = selectByLastName(lastName);
} catch (Exception ex) {
throw new EJBException("ejbFindByLastName " +
ex.getMessage());
}
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
}
else {
return result;
}
}
public Collection ejbFindInRange(double low, double high)
throws FinderException {
Collection result;
try {
result = selectInRange(low, high);
} catch (Exception ex) {
throw new EJBException("ejbFindInRange: " +
ex.getMessage());
}
if (result.isEmpty()) {
throw new ObjectNotFoundException("No rows found.");
}
else {
return result;
}
}
public void ejbRemove() {
try {
deleteRow(id);
} catch (Exception ex) {
throw new EJBException("ejbRemove: " +
ex.getMessage());
}
}
public void setEntityContext(EntityContext context) {
this.context = context;
try {
makeConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database. " +
ex.getMessage());
}
}
public void unsetEntityContext() {
try {
con.close();
} catch (SQLException ex) {
throw new EJBException("unsetEntityContext: " + ex.getMessage());
}
}
public void ejbActivate() {
id = (String)context.getPrimaryKey();
}
public void ejbPassivate() {
id = null;
}
public void ejbLoad() {
try {
loadRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
}
}
public void ejbStore() {
try {
storeRow();
} catch (Exception ex) {
throw new EJBException("ejbLoad: " +
ex.getMessage());
}
}
public void ejbPostCreate(String id, String firstName,
String lastName, double balance) { }
/*********************** Database Routines *************************/
public void makeConnection() throws NamingException, SQLException {
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("dbName");
con = ds.getConnection();
}
public void insertRow (String id, String firstName, String lastName,
double balance) throws SQLException {
String insertStatement =
"insert into account values ( ? , ? , ? , ? )";
PreparedStatement prepStmt =
con.prepareStatement(insertStatement);
prepStmt.setString(1, id);
prepStmt.setString(2, firstName);
prepStmt.setString(3, lastName);
prepStmt.setDouble(4, balance);
prepStmt.executeUpdate();
prepStmt.close();
}
public void deleteRow(String id) throws SQLException {
String deleteStatement =
"delete from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(deleteStatement);
prepStmt.setString(1, id);
prepStmt.executeUpdate();
prepStmt.close();
}
public boolean selectByPrimaryKey(String primaryKey)
throws SQLException {
String selectStatement =
"select id " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, primaryKey);
ResultSet rs = prepStmt.executeQuery();
boolean result = rs.next();
prepStmt.close();
return result;
}
public Collection selectByLastName(String lastName)
throws SQLException {
String selectStatement =
"select id " +
"from account where lastname = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, lastName);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
}
prepStmt.close();
return a;
}
public Collection selectInRange(double low, double high)
throws SQLException {
String selectStatement =
"select id from account " +
"where balance between ? and ?";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setDouble(1, low);
prepStmt.setDouble(2, high);
ResultSet rs = prepStmt.executeQuery();
ArrayList a = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
a.add(id);
}
prepStmt.close();
return a;
}
public void loadRow() throws SQLException {
String selectStatement =
"select firstname, lastname, balance " +
"from account where id = ? ";
PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, this.id);
ResultSet rs = prepStmt.executeQuery();
if (rs.next()) {
this.firstName = rs.getString(1);
this.lastName = rs.getString(2);
this.balance = rs.getDouble(3);
prepStmt.close();
}
else {
prepStmt.close();
throw new NoSuchEntityException("Row for id " + id +
" not found in database.");
}
}
public void storeRow() throws SQLException {
String updateStatement =
"update account set firstname = ? ," +
"lastname = ? , balance = ? " +
"where id = ?";
PreparedStatement prepStmt =
con.prepareStatement(updateStatement);
prepStmt.setString(1, firstName);
prepStmt.setString(2, lastName);
prepStmt.setDouble(3, balance);
prepStmt.setString(4, id);
int rowCount = prepStmt.executeUpdate();
prepStmt.close();
if (rowCount == 0) {
throw new EJBException("Storing row for id " + id + " failed.");
}
}
} // AccountEJB
5)InsufficientBalanceException.java
public class InsufficientBalanceException extends Exception {
public InsufficientBalanceException() { }
public InsufficientBalanceException(String msg) {
super(msg);
}
}
6)the ejb.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
"http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Account Example</display-name>
<enterprise-beans>
<entity>
<ejb-name>AccountEJB</ejb-name>
<home>bmp.AccontHome</home>
<remote>bmp.Account</remote>
<ejb-class>bmp.AccountEJB</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>bmp.AccountPk</prim-key-class>
<reentrant>False</reentrant>
<!--
Provide a JNDI link to the InformIT database so that this entity
bean can access it through the following string:
java:comp/env/jdbc/InformIT
Now it is the responsibility of the EJB Container to map
jdbc/InformIT to the actual JNDI database name.
-->
<resource-ref>
<description>Database connection pool</description>
<res-ref-name>jdbc/MSAccessDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
</ejb-jar>
7)jboss.xml file is :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC
"-//JBoss//DTD JBOSS 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
<jboss>
<secure>false</secure>
<container-configurations />
<resource-managers>
<resource-manager>
<res-ref-name>jdbc/MSAccessDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-jndi-name>java:/MSAccessDS</res-jndi-name>
</resource-manager>
</resource-managers>
<enterprise-beans>
<entity>
<ejb-name>AccountEJB</ejb-name>
<jndi-name>Account1Home</jndi-name>
<configuration-name></configuration-name>
</entity>
</enterprise-beans>
</jboss>
anf for configuration of the database i modified the files which i described below
1)msaccess.ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: msaccess-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ -->
<!-- ==================================================================== -->
<!-- This uses the sun jdbc-odbc driver, so don't expect miracles -->
<!-- Thanks to
Alan Moor, who warns... -->
<!-- Remember, though, never trust critical data, or data that you can't -->
<!-- afford to lose, or data that you need quick access to, or data that -->
<!-- needs to be secure, to Microsoft Access. -->
<!-- ===================================================================== -->
<datasources>
<local-tx-datasource>
<jndi-name>MSAccessDS</jndi-name>
<!-- format of URL is "jdbc
dbc
SNNAME" -->
<connection-url>"jdbc
dbc:rohit"</connection-url>
<driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
<user-name>""</user-name>
<password>""</password>
</local-tx-datasource>
</datasources>
2)standardjbosscmp.jdbc.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jbosscmp-jdbc PUBLIC
"-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN"
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
<!-- ===================================================================== -->
<!-- -->
<!-- Standard JBossCMP-JDBC Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: standardjbosscmp-jdbc.xml,v 1.84.2.8 2006/03/06 14:38:05 aloubyansky Exp $ -->
<jbosscmp-jdbc>
<defaults>
<datasource>java:/MSAccessDS</datasource>
<datasource-mapping>MS ACCESS</datasource-mapping>
<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
<pk-constraint>true</pk-constraint>
<fk-constraint>false</fk-constraint>
<preferred-relation-mapping>foreign-key</preferred-relation-mapping>
<read-ahead>
<strategy>on-load</strategy>
<page-size>1000</page-size>
<eager-load-group>*</eager-load-group>
</read-ahead>
<list-cache-max>1000</list-cache-max>
<clean-read-ahead-on-load>false</clean-read-ahead-on-load>
<unknown-pk>
<key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
<unknown-pk-class>java.lang.String</unknown-pk-class>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(32)</sql-type>
</unknown-pk>
<entity-command name="default"/>
<ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler>
<throw-runtime-exceptions>false</throw-runtime-exceptions>
</defaults>
<type-mappings>
<type-mapping>
<name>FirstSQL/J</name>
<row-locking-template/>
<pk-constraint-template>PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>char_length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>position(?1 IN ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>math.abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>math.sqrt(CAST(?1 AS DOUBLE))</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<!-- or <sql-type>VARCHAR(2147483500)</sql-type> -->
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>DECIMAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<!-- FirstSQL/J only supports directly serializable objects for classes declared with CREATE CLASS -->
<jdbc-type>LONGVARBINARY</jdbc-type>
<sql-type>VARCHAR(2147483500)</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Ingres</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 PRIMARY KEY (?3)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>concat(?1,?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>left(?1,?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>locate(?1,?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<!-- change from bit to integer , 10.12.2002 heb -->
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>INT1</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INTEGER4</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT4</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT8</sql-type>
</mapping>
<!--
Mapping proposed by Computer Associates, but does not work with JBoss properly
28.03.2003 hou
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>DECIMAL(24,6)</sql-type>
</mapping>
-->
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>LONG VARCHAR</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>McKoi</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(64)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>JAVA_OBJECT</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Firebird</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>31</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMERIC(18,0) default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>FLOAT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<!-- The small default length is due to the 128 byte max index key size -->
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(64)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>BLOB</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>InterBase</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>31</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMERIC(18,0) default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>FLOAT default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION default 0</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(64)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>VARCHAR(2000)</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>DB2</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>18</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>locate(CAST(?1 as VARCHAR(254)),
CAST(?2 as VaRCHAR(254)),?3)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<!-- DB2 does not appear to support columns of type "byte"
Regrettably, this means they'll be serialized.
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1) FOR BIT DATA</sql-type>
</mapping>
-->
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(254)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<!-- this one gives errors with DB2 V8.1
and at least the NET driver
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>BLOB(2000)</sql-type>
</mapping>
-->
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>VARBINARY</jdbc-type>
<sql-type>BLOB(2000)</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Derby</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>18</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substr</function-name>
<function-sql>substr(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>locate(?2, ?1, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>DECIMAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<!-- if someone knows the mapping for byte, please, let us know!
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
-->
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Oracle9i</name>
<!--
| Make sure that you have the Oracle 9i version of classes12.jar
| or you will suffer
-->
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>30</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substr(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>instr(?2, ?1, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>NUMBER(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>NUMBER(3)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<!-- <jdbc-type>SMALLINT</jdbc-type> this resulted in a ClassCastException -->
<sql-type>NUMBER(5)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>NUMBER(10)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMBER(19)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>NUMBER(38,7)</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR2(255)</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP(3)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP(9)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
<!--
| Change this from BLOB to RAW(n) if you know your
| serialized object will be <= n bytes and n <= 2000
-->
</mapping>
</type-mapping>
<type-mapping>
<name>Oracle8</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>30</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substr(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>instr(?2, ?1, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>NUMBER(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMBER(3)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMBER(5)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>NUMBER(10)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMBER(19)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>NUMBER(38,7)</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR2(255)</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
<!--
| Change this from BLOB to RAW(n) if you know your
| serialized object will be <= n bytes and n <= 2000
-->
</mapping>
</type-mapping>
<type-mapping>
<name>Oracle7</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>30</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substr(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>instr(?2, ?1, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>NUMBER(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMBER(3)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMBER(5)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>NUMBER(10)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMBER(19)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>NUMBER(38,7)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>NUMBER(38,15)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR2(255)</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>LONGVARBINARY</jdbc-type>
<sql-type>LONG RAW</sql-type>
<!--
| Change this from LONG RAW to RAW(n) if you know your
| serialized object will be <= n bytes and n <= 2000
| Oracle only permits one LONG type per table
-->
</mapping>
</type-mapping>
<type-mapping>
<name>Sybase</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>30</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>char_length(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BIT</sql-type>
</mapping>
<!-- Current Sybase
JDBC drivers (jConnect 5.2) don't support
byte or short. Unfortunately they'll be serialized.
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
-->
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMERIC(38,0)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(255)</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>SMALLDATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>IMAGE</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>PostgreSQL</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>(CASE position(?1 in substring(?2 from ?3)) WHEN 0 THEN 0 ELSE position(?1 in substring(?2 from ?3)) + ?3 - 1 END)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(CAST(?1 AS double precision))</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INT4</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT(7)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>TEXT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP with time zone</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP with time zone</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMERIC</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>VARBINARY</jdbc-type>
<sql-type>BYTEA</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>PostgreSQL 8.0</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>(CASE position(?1 in substring(?2 from ?3)) WHEN 0 THEN 0 ELSE position(?1 in substring(?2 from ?3)) + ?3 - 1 END)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(CAST(?1 AS double precision))</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BOOLEAN</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INT4</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT(7)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>TEXT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMERIC</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>VARBINARY</jdbc-type>
<sql-type>BYTEA</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>PostgreSQL 7.2</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>(CASE position(?1 in substring(?2 from ?3)) WHEN 0 THEN 0 ELSE position(?1 in substring(?2 from ?3)) + ?3 - 1 END)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(CAST(?1 AS double precision))</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>INT2</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INT4</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT(7)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT8</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>TEXT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>NUMERIC</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>VARBINARY</jdbc-type>
<sql-type>BYTEA</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>MSAccess</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1 IDENTITY</auto-increment-template>
<add-column-template>ALTER TABLE ?1 ADD COLUMN ?2 ?3</add-column-template>
<drop-column-template>ALTER TABLE ?1 DROP COLUMN ?2</drop-column-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>(1=1)</true-mapping>
<false-mapping>(1=0)</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 || ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>SUBSTRING(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lcase(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>LENGTH(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>LOCATE(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>ABS(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>SQRT(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>ucase(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BIT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<!-- hsqldb only supports directly serializable objects for sql type OBJECT -->
<jdbc-type>VARBINARY</jdbc-type>
<sql-type>VARBINARY</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>DECIMAL</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>PointBase</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>TRUE</true-mapping>
<false-mapping>FALSE</false-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>SOLID</name>
<row-locking-template/>
<pk-constraint-template>PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BIT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>mySQL</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<!-- does not work for compound keys <fk-constraint-template>ALTER TABLE ?1 ADD INDEX ind_?3 (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
-->
<fk-constraint-template>ALTER TABLE ?1 ADD INDEX (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1 auto_increment</auto-increment-template>
<alter-column-template>ALTER TABLE ?1 MODIFY ?2 ?3</alter-column-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>false</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>concat(?1, ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1 FROM ?2 FOR ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>length(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>locate(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>LONGBLOB</sql-type>
<!--
| Change this from LONGBLOB to BLOB if you know your
| serialized object will be <= 2^16 bytes
-->
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
<!--
| This type is problematical because mysql does not have any
| date/time types that store milliseconds.
You should avoid it.
-->
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(250) BINARY</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>MS SQLSERVER</name>
<row-locking-template>SELECT ?1 FROM ?2 with (updlock) WHERE ?3 ORDER BY ?4</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1 IDENTITY</auto-increment-template>
<alter-column-template>ALTER TABLE ?1 ALTER COLUMN ?2 ?3</alter-column-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 + ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>len(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>charindex(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>DECIMAL(20)</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>IMAGE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BIT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>MS SQLSERVER2000</name>
<row-locking-template>SELECT ?1 FROM ?2 with (xlock) WHERE ?3 ORDER BY ?4</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1 IDENTITY</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>concat</function-name>
<function-sql>(?1 + ?2)</function-sql>
</function-mapping>
<function-mapping>
<function-name>substring</function-name>
<function-sql>substring(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>lcase</function-name>
<function-sql>lower(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>length</function-name>
<function-sql>len(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
<function-sql>charindex(?1, ?2, ?3)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
<function-sql>abs(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>sqrt</function-name>
<function-sql>sqrt(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>ucase</function-name>
<function-sql>upper(?1)</function-sql>
</function-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>LONGVARBINARY</jdbc-type>
<sql-type>IMAGE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<!--
| Note that you lose granularity here
| Use a numeric type and store milliseconds if you really need it
-->
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BIT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>DB2/400</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>18</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<!-- Apparent DB2/400 doesn't handle Byte type either
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1) FOR BIT DATA</sql-type>
</mapping>
-->
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(5)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>VARCHAR(4096) FOR BIT DATA</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>SapDB</name>
<!-- SapDB 7.3 might require '... UPDATE OF ?1' in the row-locking-template -->
<!-- as is works with SapDB 7.4 -->
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD FOREIGN KEY ?2 (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>LONG BYTE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>CHAR BYTE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>DECIMAL(20)</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>MaxDB</name>
<row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD FOREIGN KEY ?2 (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<auto-increment-template>?1</auto-increment-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>true</true-mapping>
<false-mapping>false</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>LONG BYTE</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>CHAR BYTE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BOOLEAN</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>FLOAT</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>DECIMAL</jdbc-type>
<sql-type>DECIMAL(20)</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Cloudscape</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>LONGVARCHAR</jdbc-type>
<sql-type>LONG VARCHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>BOOLEAN</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>TINYINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>LONGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>LONGVARCHAR</jdbc-type>
<sql-type>LONG VARCHAR</sql-type>
</mapping>
<!-- NOTE: This alternative mapping has been suggested for cloudscape
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(256)</sql-type>
</mapping> -->
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>LONG VARBINARY</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>InformixDB</name>
<row-locking-template>select ?1 from ?2 where ?3 order by ?4 for update</row-locking-template>
<pk-constraint-template>PRIMARY KEY (?2) CONSTRAINT ?1</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT FOREIGN KEY (?3) REFERENCES ?4 (?5) CONSTRAINT ?2</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<function-mapping>
<function-name>count</function-name>
<function-sql>count(?1)</function-sql>
</function-mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR(1)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(255,0)</sql-type>
</mapping>
<mapping>
<java-type>java.math.BigDecimal</java-type>
<jdbc-type>NUMERIC</jdbc-type>
<sql-type>DECIMAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>NUMERIC(18,0)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>FLOAT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.util.Date</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME YEAR TO FRACTION(3)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>DATETIME YEAR TO FRACTION(3)</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>BLOB</jdbc-type>
<sql-type>BLOB</sql-type>
</mapping>
</type-mapping>
<type-mapping>
<name>Mimer SQL</name>
<row-locking-template/>
<pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template>
<fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template>
<alias-header-prefix>t</alias-header-prefix>
<alias-header-suffix>_</alias-header-suffix>
<alias-max-length>32</alias-max-length>
<subquery-supported>true</subquery-supported>
<true-mapping>1</true-mapping>
<false-mapping>0</false-mapping>
<mapping>
<java-type>java.lang.Boolean</java-type>
<jdbc-type>BIT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Byte</java-type>
<jdbc-type>TINYINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Short</java-type>
<jdbc-type>SMALLINT</jdbc-type>
<sql-type>SMALLINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Integer</java-type>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Long</java-type>
<jdbc-type>BIGINT</jdbc-type>
<sql-type>BIGINT</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Float</java-type>
<jdbc-type>REAL</jdbc-type>
<sql-type>REAL</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Double</java-type>
<jdbc-type>DOUBLE</jdbc-type>
<sql-type>DOUBLE PRECISION</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Character</java-type>
<jdbc-type>CHAR</jdbc-type>
<sql-type>CHAR</sql-type>
</mapping>
<mapping>
<java-type>java.lang.String</java-type>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(5000)</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Date</java-type>
<jdbc-type>DATE</jdbc-type>
<sql-type>DATE</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Time</java-type>
<jdbc-type>TIME</jdbc-type>
<sql-type>TIME</sql-type>
</mapping>
<mapping>
<java-type>java.sql.Timestamp</java-type>
<jdbc-type>TIMESTAMP</jdbc-type>
<sql-type>TIMESTAMP</sql-type>
</mapping>
<mapping>
<java-type>java.lang.Object</java-type>
<jdbc-type>JAVA_OBJECT</jdbc-type>
<sql-type>VARBINARY(5000)</sql-type>
</mapping>
</type-mapping>
</type-mappings>
<entity-commands>
<!-- default command; doesn't support unknown-pk -->
<entity-command name="default"
class="org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand"/>
<!-- variation on default that skips select before insert -->
<entity-command name="no-select-before-insert"
class="org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand">
<attribute name="SQLExceptionProcessor">jboss.jdbc:service=SQLExceptionProcessor</attribute>
</entity-command>
<!-- fetches next key value with the specified sql statement -->
<entity-command name="pk-sql"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPkSqlCreateCommand">
<!-- change to define SQL used to obtain key prior to insert -->
<attribute name="pk-sql">SELECT CURRENT_TIMESTAMP</attribute>
</entity-command>
<!-- this command requires auto-increment element for unknown-pk -->
<entity-command name="mysql-get-generated-keys"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand"/>
<!-- this command requires the specified sequence to have been created -->
<entity-command name="oracle-sequence"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand">
<attribute name="sequence">TEST_SEQUENCE</attribute>
</entity-command>
<!-- this command makes the use of a specific sequence for each table -->
<entity-command name="oracle-table-sequence"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCOracleSequenceCreateCommand">
<attribute name="sequence_name">%%t_seq</attribute>
</entity-command>
<!-- retrieves generated key of the record inserted into hsql db -->
<entity-command name="hsqldb-fetch-key"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCHsqldbCreateCommand">
<!-- uncomment to change SQL statement used to obtain identity
<attribute name="pk-sql">CALL IDENTITY()</attribute>
-->
</entity-command>
<!-- retrieves generated key of the record inserted into sybase db -->
<entity-command name="sybase-fetch-key"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSybaseCreateCommand"/>
<!-- retrieves generated key of the record inserted into SQLServer db -->
<entity-command name="mssql-fetch-key"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand">
<!-- uncomment for versions prior to SQL Server 2000
<attribute name="pk-sql">SELECT @@IDENTITY</attribute>
-->
</entity-command>
<!-- retrieves serial value of the record inserted into informix db -->
<entity-command name="informix-serial"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand">
<!-- uncomment to use with SERIAL8 column
<attribute name="method">getSerial8</attribute>
-->
</entity-command>
<!-- retrieves the currval of the the sequence associated with a PostgreSQL SERIAL column -->
<entity-command name="postgresql-fetch-seq"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand">
<!-- uncomment to change the name of the sequence; default is ${table}_${pkColumn}_seq
<attribute name="sequence"></attribute>
-->
</entity-command>
<!-- uses key generator to fetch the next key value -->
<entity-command name="key-generator"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCKeyGeneratorCreateCommand">
<attribute name="key-generator-factory">UUIDKeyGeneratorFactory</attribute>
</entity-command>
<!-- uses JDBC 3.0 getGeneratedKeys() method -->
<entity-command name="get-generated-keys"
class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBC30GeneratedKeysCreateCommand"/>
<!-- pk-sql for jdbc2 pm -->
<entity-command name="jdbc2pm-pk-sql"
class="org.jboss.ejb.plugins.cmp.jdbc2.PkSqlCreateCommand">
<!-- change to define SQL used to obtain key prior to insert -->
<attribute name="pk-sql">SELECT CURRENT_TIMESTAMP</attribute>
</entity-command>
</entity-commands>
<!-- reserved words that should not be used as table names -->
<!-- JBoss will escape them by prepending a 'X' -->
<reserved-words>
<
word>alias</word>
<word>alter</word>
<word>between</word>
<word>char</word>
<word>column</word>
<word>commit</word>
<word>create</word>
<word>date</word>
<word>default</word>
<word>delete</word>
<word>drop</word>
<word>file</word>
<word>from</word>
<word>grant</word>
<word>group</word>
<word>index</word>
<word>integer</word>
<word>join</word>
<word>number</word>
<word>on</word>
<word>order</word>
<word>primary</word>
<word>public</word>
<word>revoke</word>
<word>rollback</word>
<word>row</word>
<word>select</word>
<word>set</word>
<word>session</word>
<word>size</word>
<word>table</word>
<word>trigger</word>
<word>update</word>
<word>unique</word>
<word>user</word>
<word>varchar</word>
<word>view</word>
</reserved-words>
</jbosscmp-jdbc>
3)loginconfig.xml
<?xml version='1.0'?>
<!DOCTYPE policy PUBLIC
"-//JBoss//DTD JBOSS Security Config 3.0//EN"
"http://www.jboss.org/j2ee/dtd/security_config.dtd">
<!-- The XML based JAAS login configuration read by the
org.jboss.security.auth.login.XMLLoginConfig mbean. Add
an application-policy element for each security domain.
The outline of the application-policy is:
<application-policy name="security-domain-name">
<authentication>
<login-module code="login.module1.class.name" flag="control_flag">
<module-option name = "option1-name">option1-value</module-option>
<module-option name = "option2-name">option2-value</module-option>
...
</login-module>
<login-module code="login.module2.class.name" flag="control_flag">
...
</login-module>
...
</authentication>
</application-policy>
-->
<policy>
<!-- Used by clients within the application server VM such as
mbeans and
servlets that access EJBs.
-->
<application-policy name = "client-login">
<authentication>
<login-module code = "org.jboss.security.ClientLoginModule"
flag = "required">
<!-- Any existing security context will be restored on logout -->
<module-option name="restore-login-identity">true</module-option>
</login-module>
</authentication>
</application-policy>
<!-- Security domain for JBossMQ -->
<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "dsJndiName">java:/DefaultDS</module-option>
<module-option name = "principalsQuery">SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
<module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM JMS_ROLES WHERE USERID=?</module-option>
</login-module>
</authentication>
</application-policy>
<!-- Security domain for JBossMQ when using file-state-service.xml
<application-policy name = "jbossmq">
<authentication>
<login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
</login-module>
</authentication>
</application-policy>
-->
<!-- Security domains for
testing new jca framework -->
<application-policy name = "MSACESSDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal"></module-option>
<module-option name = "userName"></module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MSAccessDS</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name = "JmsXARealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">guest</module-option>
<module-option name = "userName">guest</module-option>
<module-option name = "password">guest</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
</login-module>
</authentication>
</application-policy>
<!-- A template configuration for the jmx-console web application. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name = "jmx-console">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">props/jmx-console-users.properties</module-option>
<module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
<!-- A template configuration for the web-console web application. This
defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name = "$webConsoleDomain">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">web-console-users.properties</module-option>
<module-option name="rolesProperties">web-console-roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
<!-- A template configuration for the JBossWS web application (and transport layer!).
This defaults to the UsersRolesLoginModule the same as other and should be
changed to a stronger authentication mechanism as required.
-->
<application-policy name="JBossWS">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/jbossws-users.properties</module-option>
<module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
<module-option name="unauthenticatedIdentity">anonymous</module-option>
</login-module>
</authentication>
</application-policy>
<!-- The default login configuration used by any security domain that
does not have a application-policy entry with a matching name
-->
<application-policy name = "other">
<!-- A simple server login module, which can be used when the number
of users is relatively small. It uses two properties files:
users.properties, which holds users (key) and their password (value).
roles.properties, which holds users (key) and a comma-separated list of
their roles (value).
The unauthenticatedIdentity property defines the name of the principal
that will be used when a null username and password are presented as is
the case for an unuathenticated web client or MDB. If you want to
allow such users to be authenticated add the property, e.g.,
unauthenticatedIdentity="nobody"
-->
<authentication>
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</authentication>
</application-policy>
</policy>
i put the jdbc driver in the default/lib directory of jboss which i found that it is found in rt.jar i put that jar file in that
after that i compile all the java files it compile successfully
and then i make the jar file using the command jar -cvf bmp.jar *
and when i copy that jar file n put into the deploy directoy it gives me the error like this please help me your help would be oblized
the error is like this
11:03:38,625 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
-8080
11:03:38,781 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
11:03:38,828 INFO [JkMain] Jk running ID=0 time=0/110 config=null
11:03:38,859 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBos
s_4_0_4_GA date=200605151000)] Started in 1m:1s:563ms
11:29:23,046 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a s
yntax error.
org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean AccountEJB
: configuration '' not found in standardjboss.xml or jboss.xml
at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMeta
Data.java:956)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:200)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
rServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
:99)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
11:29:23,468 ERROR [MainDeployer] Could not create deployment: file:/C:/Program
Files/jboss-4.0.4.GA/server/default/deploy/bmp1278.jar
org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean AccountEJB
: configuration '' not found in standardjboss.xml or jboss.xml
at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMeta
Data.java:956)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:200)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
rServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
:99)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
11:30:54,000 INFO [EJBDeployer] Undeploying: file:/C:/Program Files/jboss-4.0.4
.GA/server/default/deploy/bmp1278.jar
12:28:31,578 INFO [EJBDeployer] Undeploying: file:/C:/Program Files/jboss-4.0.4
.GA/server/default/deploy/bmp123.jar
12:28:36,734 ERROR [XmlFileLoader] failed to load jboss.xml. There could be a s
yntax error.
org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean AccountEJB
: configuration '' not found in standardjboss.xml or jboss.xml
at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMeta
Data.java:956)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:200)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
rServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
:99)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
12:28:38,421 ERROR [MainDeployer] Could not create deployment: file:/C:/Program
Files/jboss-4.0.4.GA/server/default/deploy/bmp1278.jar
org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean AccountEJB
: configuration '' not found in standardjboss.xml or jboss.xml
at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMeta
Data.java:956)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:200)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
rServiceMBeanSupport.java:238)
at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java
:99)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
ptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
or.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
BeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
run(AbstractDeploymentScanner.java:225)
please help me i m very thankfull if somebody help me for this i m stuckup from the one week