Hi all,

I guess I've asked enough questions, so I'll share my answers with
everyone...

> > I'm having a real hard time trying to get JBoss working with MySQL;
> > reading through the list archives, all I can really ascertain is that
> > the docs are not necessarily correct with regards to setting up JBoss.
>
> There's some JBoss 2.0 related stuff that's no longer accurate.

That's for sure...is someone updating the docs for this, or is it
something I could help with ?

> Sorry, I'm not a MySQL person, so I can't give you precise settings, but
> in general:
> 1. Do Nothing to jboss.properties or jboss.conf
> 2. Add your driver to the JdbcProvider mbean in jboss.jcml

That's exactly what I did with a little trial,error and reading of the
MS SQL Server docs, and lo and behold, it all worked.

> 3. Add a XADataSource mbean (or modify an existing one) to jboss.jcml.
> Use the DefaultDS one as a template. You should only need to change the
> URL, JDBCUser, and Password attributes to get it working.

FWIW, the following is what I placed in the jboss.jcml file.  The big
battle was getting the XADataSourceImpl to work; the docs are quite old
here.

I also suffered from a problem someone reported a few days back; that
eventually the connection pool would be created, but JBoss would then
hang.  Turning logging for MySql on (in the mbean below, I set
LoggingEnabled to true), I noticed that the username and password I
was providing as attributes, were not allowing connection to my MySql
database, and underlying all of this, JDBC was throwing an SQLException.
I removed the username and password attributes altogether (commented
out below) and just gave blanket permissions to all on MySQL, and it
all worked fine...a problem to solve for another day.

I've deployed the CD example using MySQL as the CMP Persistence layer,
after changing standardjaws.xml, uploaded some CDs, and listed them
back...so it all seems to work fine.

A few more questions, but we'll take a short break to paste in the
code that I managed to get things working with....


  <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://localhost/test</attribute>
       <attribute name="GCMinIdleTime">1200000</attribute>
       <!--attribute name="JDBCUser">username</attribute-->
       <attribute name="MaxSize">10</attribute>
       <!--attribute name="Password">password</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">true</attribute>
       <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
       <attribute name="MinSize">0</attribute>
  </mbean>




....thanks for staying with me ;)

More questions from me now:

1.      What's the difference between standardjaws.xml (which exists
by default) and jaws.xml (which doesn't exist by default).  Should I
be editing standardjaws.xml, or should I be copying it to jaws.xml,
and editing that ?  Apologies if this in the docs, but I can't find
a good answer to this.

2.      Even though I know my CMP is working with MySQL, if I look at
the MySQL database with a client, the data doesn't seem to have yet
persisted - I assume it's being cached somehow ?  Is this correct ?
Does it eventually write-through ?  I noticed another post about the
<commit-option/> in jboss.xml/standardjboss.xml (same question - which
should I edit ?) which I'll pursue the EJB spec about...


> It isn't deprecated, exactly, it's just that it doesn't need to be
> modified much anymore. It's used as a bootstrap to get some of the base
> JBoss MBeans up and running, then they take over and load the mbeans
> specified in jboss.jcml, the jboss-auto.jcml (or some variant of
> that order)

Gotcha.

> They're only read at startup. If you point a browser at port 8082 of the
> machine JBoss is running on, however, you'll get a crude web interface
> allowing you to change things on the fly. Things changed here wind up in
> jboss-auto.jcml.

Aha...thanks.

> I hope this helps,
> danch

Very much so.....I appreciate you putting up with the questions, I hope
they're not all "RTFM" invites...

I continue to be impressed as hell by JBoss....great work guys, hope I
can contribute a bit more to the initiative once I'm more familiar.

Steven


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to