I think i found a solution based on an older mail (Re: [jBoss-User] Jaws xml
DB other than hypersonic)
Thank you both for your help. 

My problem was that datasource was started without any errors but when i
test it with
bank test client, it used Hypersonic DB. 

I am not sure about the CODEBASE (i didn't have a .jar, or zip, so the only
place to declare the classpath for the jdbc driver was only though this
tag).

I Changed the jaws.xml of Bank EJB to 
-------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jaws>
    <datasource>MS SQLSERVER</datasource>               /********* declaring
it here solves the problem ********/
    <type-mappings>
    <type-mapping>
      <name>MS SQLSERVER</name>         
      <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.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>IMAGE</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>
          <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>DATETIME</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-mappings>
        
    <enterprise-beans>
        <entity>
            <ejb-name>Customer</ejb-name>
            <table-name>Customer</table-name>
            <create-table>true</create-table>
            <remove-table>false</remove-table>
            <tuned-updates>false</tuned-updates>
            <cmp-field>
                <field-name>id</field-name>
                <column-name>id</column-name>
                <sql-type>VARCHAR(256)</sql-type>
                <jdbc-type>VARCHAR</jdbc-type>
            </cmp-field>
            <cmp-field>
                <field-name>name</field-name>
                <column-name>name</column-name>
                <sql-type>VARCHAR(256)</sql-type>
                <jdbc-type>VARCHAR</jdbc-type>
            </cmp-field>
        </entity>
        <entity>
            <ejb-name>Account</ejb-name>
            <table-name>Account</table-name>
            <create-table>true</create-table>
            <remove-table>false</remove-table>
            <tuned-updates>false</tuned-updates>
            <cmp-field>
                <field-name>owner</field-name>
                <column-name>owner</column-name>
                <sql-type>ejb/Customer</sql-type>
                <jdbc-type>REF</jdbc-type>
            </cmp-field>
            <cmp-field>
                <field-name>balance</field-name>
                <column-name>balance</column-name>
                <sql-type>REAL</sql-type>
                <jdbc-type>REAL</jdbc-type>
            </cmp-field>
            <cmp-field>
                <field-name>id</field-name>
                <column-name>id</column-name>
                <sql-type>VARCHAR(256)</sql-type>
                <jdbc-type>VARCHAR</jdbc-type>
            </cmp-field>
            <finder>
                <name>findLargeAccounts</name>
                <query>balance &gt; {0}</query>
                <order>balance</order>
            </finder>
        </entity>
    </enterprise-beans> 
</jaws>

modified jboss.conf entry for my datasource to 
-------------------------------------------------------------------------
<MLET CODE = "org.jboss.jdbc.DataSourceImpl"
ARCHIVE="jboss.jar,jdbc2_0-stdext.jar" CODEBASE="c:/Opta2000_trial">
   <ARG TYPE="java.lang.String"
VALUE="jdbc:inetdae:myDBHost:1433?database=myDataBase">
   <ARG TYPE="java.lang.String" VALUE="MS SQLSERVER">
/******** This must be the name of datasource that we want to use
***********/
   <ARG TYPE="java.lang.String" VALUE="com.inet.tds.TdsDriver"> 
   <ARG TYPE="java.lang.String" VALUE="myUserName">
   <ARG TYPE="java.lang.String" VALUE="myPassword">
</MLET>

> -----Original Message-----
> From: Tom MAK [SMTP:[EMAIL PROTECTED]]
> Sent: OaoUnoc, 5 Eioe?io 2000 03:42
> To:   [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Subject:      RE: [jBoss-User] SQL Server with jdbc, help !
> 
> Hi,
> 
> I'm not sure about JBoss's config, but for MS SQL Server JDBC, the config 
> should look like the following:
> 
> driver=com.inet.tds.TdsDriver
> url=jdbc:inetdae:localhost:1433?database=pubs
> 
> hope this help!
> 
> 
> 
> 
> >From: ARAVIAS EFSTRATIOS <[EMAIL PROTECTED]>
> >Reply-To: "jBoss" <[EMAIL PROTECTED]>
> >To: jBoss <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: RE: [jBoss-User] SQL Server with jdbc, help !
> >Date: Mon, 3 Jul 2000 19:09:36 +0300
> >
> >I try to configure MS SQL Server with I-Net jdbc driver, and i have tried
> >what Steve Kwee suggested. But when i run the bank test
> >i don't see any new tables in MS SQL Server. I think it uses the 
> >Hypersonic.
> >Please if anyone has tried something similar, or if anyone can explain
> the
> >structure
> >of the misc. config settings ?
> >
> >1. I don't use odbc so step 1 is not necessary
> >2. I modified the jboss.properties file to
> >
> >
> >jdbc.drivers=org.hsql.jdbcDriver,jdbc.idbDriver,com.inet.tds.TdsDriver
> >
> >3. i added the supposed MLET (but since i don't have a descr for what
> >exactly the ARG fields represent, i am not sure if they are ok)
> >
> ><MLET CODE = "org.jboss.jdbc.DataSourceImpl"
> >ARCHIVE="jboss.jar,jdbc2_0-stdext.jar" CODEBASE="c:/Opta2000_trial">
> >    <ARG TYPE="java.lang.String"
> >VALUE="jdbc:inetdae:e-commerce:1433?database=stratos">
> >    <ARG TYPE="java.lang.String" VALUE="MS SQLSERVER">
> >/********** What's This ? ******************/
> >    <ARG TYPE="java.lang.String" VALUE="com.inet.tds.TdsDriver">
> >/********** Driver class *********************/
> >    <ARG TYPE="java.lang.String" VALUE="stratos">
> >/********** This seems the login **********/
> >    <ARG TYPE="java.lang.String" VALUE="stratos">
> >/**********           -//-         passwd ******/
> ></MLET>
> >
> >4. Is done (an i have rebuild the cvs version), but what datasource do i 
> >use
> >?
> >
> >Here is the jaws.xml
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><jaws>
> >     <type-mappings>
> >     <type-mapping>
> >       <name>MS SQLSERVER</name>
> >       <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.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>IMAGE</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>
> >           <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>DATETIME</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-mappings>
> >
> >     <enterprise-beans>
> >         <entity>
> >             <ejb-name>Customer</ejb-name>
> >             <table-name>Customer</table-name>
> >             <create-table>true</create-table>
> >             <remove-table>false</remove-table>
> >             <tuned-updates>false</tuned-updates>
> >             <cmp-field>
> >                 <field-name>id</field-name>
> >                 <column-name>id</column-name>
> >                 <sql-type>VARCHAR(256)</sql-type>
> >                 <jdbc-type>VARCHAR</jdbc-type>
> >             </cmp-field>
> >             <cmp-field>
> >                 <field-name>name</field-name>
> >                 <column-name>name</column-name>
> >                 <sql-type>VARCHAR(256)</sql-type>
> >                 <jdbc-type>VARCHAR</jdbc-type>
> >             </cmp-field>
> >         </entity>
> >         <entity>
> >             <ejb-name>Account</ejb-name>
> >             <table-name>Account</table-name>
> >             <create-table>true</create-table>
> >             <remove-table>false</remove-table>
> >             <tuned-updates>false</tuned-updates>
> >             <cmp-field>
> >                 <field-name>owner</field-name>
> >                 <column-name>owner</column-name>
> >                 <sql-type>ejb/Customer</sql-type>
> >                 <jdbc-type>REF</jdbc-type>
> >             </cmp-field>
> >             <cmp-field>
> >                 <field-name>balance</field-name>
> >                 <column-name>balance</column-name>
> >                 <sql-type>REAL</sql-type>
> >                 <jdbc-type>REAL</jdbc-type>
> >             </cmp-field>
> >             <cmp-field>
> >                 <field-name>id</field-name>
> >                 <column-name>id</column-name>
> >                 <sql-type>VARCHAR(256)</sql-type>
> >                 <jdbc-type>VARCHAR</jdbc-type>
> >             </cmp-field>
> >             <finder>
> >                 <name>findLargeAccounts</name>
> >                 <query>balance &gt; {0}</query>
> >                 <order>balance</order>
> >             </finder>
> >         </entity>
> >         <datasource>MS SQLSERVER</datasource>
> >/***** What datasource should i place ? *********/
> >         <type-mapping>MS SQLSERVER</type-mapping>
> >     </enterprise-beans>
> >
> ></jaws>
> >
> >     5. I have modified the jaws.xml in EJB to use
> >        a) the MS SQLSERVER Type-Mapping with
> >             <type-mapping>MS SQLSERVER</type-mapping>
> >        b) your Datasource
> >             <datasource>MS SQLSERVER</datasource>
> >
> >     Thanks
> >     Stratis
> >
> >
> > > -----Original Message-----
> > > From:     Steve Kwee [SMTP:[EMAIL PROTECTED]]
> > > Sent:     On?oc, 27 Eioi?io 2000 11:20
> > > To:       'jBoss'
> > > Subject:  AW: [jBoss-User] SQL Server
> > >
> > > At least, there is someone else, using MSSQL...
> > > Last night I put toghether this kind of readme on the topic.
> > > Works with a compiled version I took from the cvs a week ago.
> > >
> > > Using MS SQLServer with the JDBC-ODBC Bridge (included in JDK since 
> >1.2.x)
> > > 
> >-------------------------------------------------------------------------
> -
> > > Should also work for other ODBC Datasources
> > >
> > > 1. Install ODBC Datasource <my_dsn>
> > >
> > > 2. Add sun.jdbc.odbc.JdbcOdbcDriver to jboss.properties:
> > >
> > > 
> >jdbc.drivers=org.hsql.jdbcDriver,jdbc.idbDriver,sun.jdbc.odbc.JdbcOdbcDri
> v
> > > er
> > >
> > > 3. Add MLet for Datasource in jboss.conf
> > >    <MLET CODE = "org.jboss.jdbc.DataSourceImpl" ARCHIVE="rt.jar"
> > > CODEBASE="../lib/ext/">
> > >       <ARG TYPE="java.lang.String" VALUE="jdbc:odbc:my_dsn">
> > >       <ARG TYPE="java.lang.String" VALUE="my_dsn">
> > >       <ARG TYPE="java.lang.String"
> VALUE="sun.jdbc.odbc.JdbcOdbcDriver">
> > >       <ARG TYPE="java.lang.String" VALUE="sa">
> > >       <ARG TYPE="java.lang.String" VALUE="">
> > >    </MLET>
> > >
> > > 4. Add Type-Mapping for MS SQLSERVER to the beans jaws.xml
> > >   (was provided by Pedro Mota, maybe someone could add it to the
> > > cvs/defaultjaws.xml)
> > >     <type-mapping>
> > >       <name>MS SQLSERVER</name>
> > >       <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.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>IMAGE</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>
> > >           <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>DATETIME</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>
> > >
> > > 5. Edit your beans jaws.xml and tell your enterprise-beans to use
> > >    a) the MS SQLSERVER Type-Mapping with
> > >         <type-mapping>MS SQLSERVER</type-mapping>
> > >    b) your Datasource
> > >         <datasource>my_dsn</datasource>
> > >
> > > This has been testet with the banktest and worked only "half".
> > > Jaws was able to init create the tables and to populate the table
> > > customers
> > > but failed to insert data into accounts.
> > >
> > >
> > >
> > > -----Ursprungliche Nachricht-----
> > > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Gesendet: Dienstag, 27. Juni 2000 12:12
> > > An: [EMAIL PROTECTED]
> > > Betreff: [jBoss-User] SQL Server
> > >
> > >
> > > hello
> > >
> > > How I can configure jboss2.0 for using MS SQL Server?
> > >
> > > The container documentation says that I can use management console to
> > > manualy deploy/undeploy without stop the server. How can I do that in
> > > reality?
> > >
> > > Thank's you
> > >
> > > William
> > >
> > > ----------------------------------------------------------------
> > > Get your free email from AltaVista at http://altavista.iname.com
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > Problems?:           [EMAIL PROTECTED]
> > >
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > Problems?:           [EMAIL PROTECTED]
> >
> >
> >--
> >--------------------------------------------------------------
> >To subscribe:        [EMAIL PROTECTED]
> >To unsubscribe:      [EMAIL PROTECTED]
> >Problems?:           [EMAIL PROTECTED]
> >
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to