Title: Orion and MySQL
Hi  Dube , Craig .
 
 I have deployed an entity  bean[CMP]  in the MySQL database.
 
I  am  specifying database-schemas\mysql.xml  &  modifications in data-sources.xml  as  it is.
 
1]database-schemas\mysql.xml 
 
<?xml version="1.0"?>
<!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema" "http://www.orionserver.com/dtds/database-schemas.dtd">
<!-- Author : Shailesh Joshi  -->
<database-schema name="Mysql" not-null="not null" null="" primary-key="primary key">
 
 <type-mapping type="java.lang.String" name="varchar(255)" />
 <type-mapping type="int" name="integer" />
 <type-mapping type="float" name="float" />
 <type-mapping type="double" name="double" />
 
  <type-mapping type="byte" name="smallint" />
 <type-mapping type="char" name="char(1)" />
 <type-mapping type="short" name="integer" />
 <type-mapping type="boolean" name="bit" />
 <type-mapping type="java.util.Date" name="datetime" />
 
 <disallowed-field name="password" />
 <disallowed-field name="username" />
 <disallowed-field name="date" />
 <disallowed-field name="text" />
</database-schema>
 
 
 
2]Part added  to  data-sources.xml
 
<data-source
    name="MySQL"
    class="com.evermind.sql.ConnectionDataSource"
    location="jdbc/DefaultDS"
    pooled-location="jdbc/DefaultPooledDS"
    xa-location="jdbc/xa/DefaultXADS"
    ejb-location="jdbc/DefaultEJBDS"
    url="jdbc:mysql://<IPAddress>/Test"                          [Test is  my  database]
   
    connection-driver="org.gjt.mm.mysql.Driver"
    username="xxxxx"
    password="xxxxx"
    inactivity-timeout="30"
    schema="database-schemas/mysql.xml"
  />
 
                                                                               
                                                                                         Shailesh Joshi
                                                                                       Java  Programmer
                                                                                     Versaware(India) Ltd.
----- Original Message -----
Sent: Tuesday, October 10, 2000 1:24 AM
Subject: Orion and MySQL


I am trying to set up orion to use MySQL instead of HypersonicSQL.  I'm looking for some advice on how to properly setup Orion to use the MySQL database that I have installed.

So far I have used the MySQL admin tool to creat a database called oriondb.  I have also edited the "data-sources.xml" and added a "mysql.xml" file under the database-schemas directory.  Here is a piece of the "data-sources.xml" file and a piece of the "mysql.xml":

data-sources.xml
----------------
  <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="MySQL"
    location="jdbc/DefaultCoreDS"
    xa-location="jdbc/xa/DefaultXADS"
    ejb-location="jdbc/DefaultDS"
    pooled-location="jdbc/DefaultPooledDS"
    connection-driver="org.gjt.mm.mysql.Driver"
    username="root"
    password="root"
    url="jdbc:mysql://localhost/mysql/data/oriondb"
    inactivity-timeout="30"
    schema="database-schemas/mysql.xml"
  />


mysql.xml
---------
  <database-schema name="MySQL" not-null="not null" null="" primary-key="primary key">
    <type-mapping type="java.lang.String" name="char (255)" />
    <type-mapping type="int" name="int" />
    <type-mapping type="long" name="int" />
    <type-mapping type="float" name="float" />
    <type-mapping type="double" name="double" />
    <type-mapping type="byte" name="smallint" />
    <type-mapping type="char" name="char" />
    <type-mapping type="short" name="short" />
    <type-mapping type="java.util.Date" name="timestamp" />
       
    <disallowed-field name="password" />
    <disallowed-field name="username" />
    <disallowed-field name="date" />
    <disallowed-field name="order" />
  </database-schema>


I was very unsure as to what I should use for the "location" tags in the data-sources file.  Also, with the "mysql.xml" file, I copied the Hypersonic schema file and removed the boolean type-mapping (I thought this might be my problem).

The error I get when I deply states "SQL error: Communication link failure: Bad handshake".  If anyone has successfully deployed MySQL with Orion, I would be very much interested in the contents of their xml files.

- CJD

Reply via email to