Hi,

Just in case you are still interested...

I took a look at how the minerva wrappers are creating connections-- they
use a Driver, not a Datasource.  So if you provide a user and password as
separate attributes, they are used to get the connection, other properties
are ignored.

So... I still haven't reproduced your problem, but I believe you can set
the charSet, roleName, and other optional Firebird/interclient properties
like this:

  <mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
     <attribute name="Drivers">interbase.interclient.Driver</attribute>
  </mbean>


  <mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=DefaultDS">
    <attribute name="PoolName">DefaultDS</attribute>
    <attribute 
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
    <attribute 
name="URL">jdbc:interbase://localhost/usr/java/jboss/dev/jboss/dist/db/firebird/jbosstest.gdb</attribute>
    <!--attribute name="JDBCUser">sysdba</attribute-->
    <!--attribute name="Password">masterkey</attribute-->
    <attribute name="Autocommit">false</attribute>
    <attribute 
name="Properties">user=sysdba;password=masterkey;charSet=UTF8</attribute>
      
  </mbean>


NOTE that the JDBCUser and Password attributes are removed!  In fact, it
appears that you have to remove them from jboss-auto.jcml yourself also!

A not so pleasant feature of the minerva stuff appears to be that if your
connection info is wrong you don't seem to be able to fix the connection
info in  the mbean web pages-- I had to stop and restart jboss itself. 
Maybe I got the wrong sequence of actions, I kept getting an illegal state
exception, pool already initialized.


Hope this is useful.

David Jencks
On 2001.03.02 04:38:14 -0500 Dirk Ohst wrote:
> Hi,
> 
> many thanks for your answer. Now I am creating a 'fresh' jboss
> installation and set the configuration files like follows:
> 
> 
> jboss.jcml:
> 
>   <mbean code="org.jboss.jdbc.XADataSourceLoader"
> name="DefaultDomain:service=XADataSource,name=InterBaseDB">
>     <attribute name="PoolName">InterBaseDB</attribute>
>     <attribute
> 
>name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
>     <attribute
> name="URL">jdbc:interbase://localhost/var/ibase/db/jboss.gdb</attribute>
>     <attribute name="JDBCUser">sysdba</attribute>
>     <attribute name="Password">masterkey</attribute>
>     <attribute name="Autocommit">false</attribute>
>     <attribute name="charSet">UTF8</attribute>
>       
>   </mbean>
> 
> jboss.conf:
> 
> <MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar"
> CODEBASE="../lib/ext/">
>                           <ARG TYPE="java.lang.String"
> VALUE="InterBaseDB">
>                           <ARG TYPE="java.lang.String"
> VALUE="org.jboss.minerva.xa.XADataSourceImpl">
>                          </MLET>
> 
> jboss.properties:
> 
> 
>jdbc.drivers=interbase.interclient.Driver,org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver
> 
> 
> standardjaws.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <jaws>
>     <datasource>java:/InterBaseDB</datasource>
>     <type-mapping>InterBase</type-mapping>
> ... (changed nothing else)
> 
> 
> - copied a new compilation of interbase.jar (without UTF8 hardcoded) to
>    $JBOSS_HOME/lib/ext
> - created a new database (later I need unicode tables):
> 
> CREATE DATABASE "/var/ibase/db/jboss.gdb" DEFAULT CHARACTER SET
> UNICODE_FSS;
> 
> create table cd (
>   id  VARCHAR (200),
>   title  VARCHAR (200),
>   artist VARCHAR (200),
>   mtype  VARCHAR (200),
>   notes  VARCHAR (200)
> 
> );
> 
> commit;
> 
> 
> jaws.xml:
> 
> <jaws>
>     <enterprise-beans>
>       <entity>
>         <ejb-name>CDBean</ejb-name>
>         <table-name>cd</table-name>
>         <create-table>false</create-table>
>         <cmp-field>
>           <field-name>id</field-name>
>           <column-name>id</column-name>
>         </cmp-field>
>         <cmp-field>
>           <field-name>title</field-name>
>           <column-name>title</column-name>
>         </cmp-field>
>         <cmp-field>
>           <field-name>artist</field-name>
>           <column-name>artist</column-name>
>         </cmp-field>
>         <cmp-field>
>           <field-name>mtype</field-name>
>           <column-name>mtype</column-name>
>         </cmp-field>
>         <cmp-field>
>           <field-name>notes</field-name>
>           <column-name>notes</column-name>
>         </cmp-field>
>        </entity>
>     </enterprise-beans>
> 
>   </jaws>
> 
> (Changed the java-attribute  title to mtitle because 'type' is an
> interbase keyword)
> 
> The execution of  com.web_tomorrow.cd.Upload (filling the database)
> resulted in the exception again and the config-file jboss.jcml was
> converted by jboss to:
> 
>      <mbean name="DefaultDomain:service=XADataSource,name=InterBaseDB">
>        <attribute name="Properties"></attribute>
>        <attribute
> name="URL">jdbc:interbase://localhost/var/ibase/db/jboss.gdb</attribute>
>        <attribute name="GCMinIdleTime">1200000</attribute>
>        <attribute name="JDBCUser">sysdba</attribute>
>        <attribute name="MaxSize">0</attribute>
>        <attribute name="Password">masterkey</attribute>
>        <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">false</attribute>
>        <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
>        <attribute name="MinSize">0</attribute>
>      </mbean>
> 
> After that I changed one line in jboss.jcml:
> 
>        <attribute
> name="Properties">charSet=interbase.interclient.CharacterEncodings.UTF8</attribute>
> 
> with the same result.
> 
> (see table 3.1 in section 'Creating DB Connection Pools' in the new
> Manual)
> 
> and then to:
> 
>        <attribute
> name="Properties">characterEncodings=CharacterEncodings.UTF8</attribute>
> 
> 
> and got the exception again.
> 
> And at least I removed the jaws.xml file to let JAWS create the tables
> with the same result (before I droped the table). I have no more ideas
> what to do.
> 
> Regards,
> 
> Dirk.
> 
> PS: when unsing the hardcoded utf8 in interclient.jar it works with
> tables create by JAWS and by myself ?!?
> 
> David Jencks wrote:
> > 
> > Hi,
> > 
> > You didn't show your xml files... but I think you can set the charset
> in
> > jboss.jcml like this:
> > 
> >   <mbean code="org.jboss.jdbc.XADataSourceLoader"
> > name="DefaultDomain:service=XADataSource,name=DefaultDS">
> >     <attribute name="PoolName">DefaultDS</attribute>
> >     <attribute 
>name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
> >     <attribute 
>name="URL">jdbc:interbase://localhost/usr/java/jboss/dev/jboss/dist/db/firebird/jbosstest.gdb</attribute>
> >     <attribute name="JDBCUser">sysdba</attribute>
> >     <attribute name="Password">masterkey</attribute>
> >     <attribute name="Autocommit">false</attribute>
> >     <attribute name="charSet">UTF8</attribute>
> > 
> >   </mbean>
> > 
> > I haven't been able to get the CD store example working yet, and my
> default
> > configuration seems to work fine with accented characters.  Did you
> create
> > your table using JAWS? maybe there is a semi-incompatible character set
> > from creating your table elsewhere and using interclient (just a wild
> > guess).
> >
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> 
> 
> 



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

Reply via email to