Hi Aaron,
now the test runs. I have to clear the table, before I run the test again...
The datatype TIMESTAMP won't work if it is in ejb-jar.xml defined. But if
not then it is not stored in the database, right ?
Here the results:
---- snip ----
E:\Develop\cvs\jbosstest\dist\bin>java -classpath ../lib/dbtestclient.jar
org.jb
oss.test.dbtest.test.Main
_____________________________________________
jBoss, the EJB Open Source Server
Copyright (C), The jBoss Organization, 2000
_____________________________________________
Welcome to the database test
_____________________________________________
Deploying the bean...done!
1- Looking up the home AllTypes...OK
2- Calling findByPrimaryKey on AllTypesHome with name seb...Object with
primary
key seb not found in storage
not found OK
3- Calling create on AllTypesHome with name seb...OK
Getting all the fields
4- boolean true OK
5- byte 1 OK
6- short 2 OK
7- int 3 OK
8- long 4 OK
9- float 5.6 OK
10- double 7.8 OK
No char test yet, bug in jdk
11- String seb OK
12- Date Mon Oct 23 15:29:30 GMT+02:00 2000 OK
13- Time 15:29:30 OK
14- Timestamp 2000-10-23 15:29:30.976 OK
15- MyObject OK
16- Creating Record beans and adding them to the Collection in Alltypes..OK
17- Getting them back..OK
All basic tests passed; Now testing min/max values.
This is just for information, it's okay if some fail.
Not all DBs have a column type that supports 8-byte numbers.
18- Double Min Value OK
19- Double Max Value OK
20- Float Min Value OK
21- Float Max Value OK
22- Long Min Value OK
23- Long Max Value OK
24- Short Min Value OK
25- Short Max Value OK
26- Byte Min Value Failed
27- Byte Max Value Failed
28- Int Min Value Failed
29- Int Max Value Failed
_____________________________________________
Congratulations! Test completed
Please report success to the mailing list:
[EMAIL PROTECTED]
Don't forget to mention:
OS : Windows 2000
JDK vendor/version : SUN JSDK 1.3
jBoss version : JBOSS 2.0 BETA 03 CVS 23.10.2000 in the morning
Database name/version : IBM DB2/400
JDBC driver version : jt400.jar V4R2M0.6
And please include:
Your setup: relevant parts of jboss.properties, jboss.conf and jboss.jcml
The type-mappings from jaws.xml if you changed them
Thanks very much!
---- snap ----
jboss.properties:
---- snip ----
jdbc.drivers=com.ibm.as400.access.AS400JDBCDriver
---- snap ----
jboss.conf:
---- snip ----
<MLET CODE = "org.jboss.jdbc.JdbcProvider" ARCHIVE="jboss.jar,jt400.jar"
CODEBASE="../lib/ext/">
</MLET>
<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
CODEBASE="../lib/ext/">
<ARG TYPE="java.lang.String" VALUE="AS400Pool">
<ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>
---- snap ----
jboss.jcml:
---- snip ----
<mbean name="DefaultDomain:service=XADataSource,name=AS400Pool">
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:as400://OBLAS170;transaction
isolation=serializable;errors=full</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">0</attribute>
<attribute name="Password" />
<attribute name="GCEnabled">false</attribute>
<attribute name="InvalidateOnError">false</attribute>
<attribute name="TimestampUsed">false</attribute>
<attribute name="Blocking">true</attribute>
<attribute name="GCInterval">120000</attribute>
<attribute name="IdleTimeout">1800000</attribute>
<attribute name="IdleTimeoutEnabled">false</attribute>
<attribute name="LoggingEnabled">true</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>
---- snap ----
jaws.xml:
---- snip ----
<?xml version="1.0" encoding="UTF-8"?>
<jaws>
<!-- Replace this with the name of your connection pool (from
jboss.conf) -->
<datasource>AS400Pool</datasource>
<!-- Replace this with the type-mapping you want to use (choose one
below) -->
<type-mapping>DB2/400</type-mapping>
<default-entity>
<remove-table>false</remove-table>
</default-entity>
<type-mappings>
<type-mapping>
<name>DB2/400</name>
<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>
<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>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.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>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>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-mappings>
</jaws>
---- snap ----
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]