Hello Boris -
Following is the JDBC section from jboss.jcml. I commented out a number of
the sections for InstantDB and Hypersonic, and modified the defaultDS to be
mySQL. In the mySQL sections, I made both the default and the named "mySQL"
connection pools to point to the same database, in this case it is called
"partner". Also, I left in the loading of the other (non-mySQL) drivers,
with no apparent harm. I'll probably take these out for production. I've not
tinkered with any of the other settings, and probably should just so I
understand what they all mean :-)
As to problems, older versions of mySQL did not support transactions, and
jboss complained bitterly about that. Also, I have not had any luck with CMP
using a java.sql.Timestamp field, and instead use java.util.Date, since it
is mapped to a DATETIME field in mySQL anyway. Also, the syntax in the jboss
config files has been changing a bit, and since mySQL is not one of the
"native" databases, it takes some time for the mySQL users to catch up with
examples for the latest syntax, thus some confusion always seems to ensue.
I've been using this most recently with the MVCSoft persistence manager, to
get used the V2 style of CMP, and it has been working great. (with the
exception of the Timestamp type as noted above)
Hope this helps!
Larry Budnick
<!-- JDBC -->
<mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
<attribute
name="Drivers">org.gjt.mm.mysql.Driver,org.hsql.jdbcDriver,org.enhydra.insta
ntdb.jdbc.idbDriver</attribute>
</mbean>
<!--
<mbean code="org.jboss.jdbc.HypersonicDatabase"
name="DefaultDomain:service=Hypersonic">
<attribute name="Port">1476</attribute>
<attribute name="Silent">true</attribute>
<attribute name="Database">default</attribute>
<attribute name="Trace">false</attribute>
</mbean>
-->
<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=mySQL">
<attribute name="PoolName">mySQL</attribute>
<attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://127.0.0.1:3306/partner</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser">root</attribute>
<attribute name="MaxSize">10</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">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>
<!--
<mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=InstantDB">
<attribute name="PoolName">InstantDB</attribute>
<attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l</attribute>
<attribute name="Properties"></attribute>
<attribute
name="URL">jdbc:idb:../conf/default/instantdb.properties</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser" />
<attribute name="MaxSize">10</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">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</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.XADataSourceImp
l</attribute>
<attribute name="Properties"></attribute>
<attribute name="URL">jdbc:mysql://127.0.0.1:3306/partner</attribute>
<attribute name="GCMinIdleTime">1200000</attribute>
<attribute name="JDBCUser">root</attribute>
<attribute name="MaxSize">10</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">false</attribute>
<attribute name="MaxIdleTimeoutPercent">1.0</attribute>
<attribute name="MinSize">0</attribute>
</mbean>
----- Original Message -----
From: "Boris Garbuzov" <[EMAIL PROTECTED]>
To: "Larry Budnick" <[EMAIL PROTECTED]>
Sent: Saturday, June 16, 2001 1:51 AM
Subject: Re: [JBoss-user] mysql
> Thanks very much, Larry. So how do I reconfiger JBoss to change default
from
> hypersonic to MySql. Also, if it is so simple, what kind of problems of
MySql
> support was discussed previously on the list?
>
> ----------------
>
>
>
> Larry Budnick wrote:
>
> > If you still need assistance, please let me know. I use MySQL (latest
> > versions, with BDB tables) very successfully with jboss. In general,
nothing
> > fancy, just specify the database name at the end of the URL to define
the DB
> > to use for the pool.
> >
> > Larry Budnick
> >
> > ----- Original Message -----
> > From: "Boris Garbuzov" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 15, 2001 7:33 PM
> > Subject: [JBoss-user] mysql
> >
> > > I saw some doubts on the list about future MySQL support. Is it
currently
> > supported by JBoss' CMP? What should I tell to JBoss to use my
connection
> > URL and associated issues?
> > >
> > >
> > > _______________________________________________
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user