Hi, all
 
I am configing mySQL data source with my cmp ejb,
according to the instructions on the jboss manual,
I have done all of the steps, but I can't yet use
my datasource.
 
these are my steps:
1 In jboss.jcml
  a: I added my mySQL driver:
  <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider">
     <!-- Uncomment to set default database :by Sam Liu
     <attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver</attribute>
      -->
     <attribute name="Drivers">org.gjt.mm.mysql.Driver</attribute>
  </mbean>
 
  b: I added my minerva pool and commented old pools of the hypersonic and instantdb.
  <!-- Write by Sam Liu -->
  <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQLDB">
    <attribute name="PoolName">mySQLDS</attribute>
    <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl</attribute>
    <attribute name="URL">jdbc:mysql://host/cash</attribute>
    <attribute name="JDBCUser">root</attribute>
    <attribute name="Password" />
  </mbean>
 
  <!-- Comment by Sam Liu
  <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=InstantDB">
    <attribute name="PoolName">InstantDB</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="MaxIdleTimeoutPercent">1.0</attribute>
    <attribute name="MinSize">0</attribute>
  </mbean>
   -->
 
2 In standardjaws.xml
    I commented java:/DefaultDS and added java:/mySQLDS
    <!-- Comment by Sam Liu
    <datasource>java:/DefaultDS</datasource>
    <type-mapping>Hypersonic SQL</type-mapping>
     -->
    
    <datasource>java:/mySQLDS</datasource>
    <type-mapping>mySQL</type-mapping>
 
then I run my jboss with the examples that come from Richard Monson-Haefel's book (Enterprise JavaBeans, 2nd Edition)
 (Chapter 4) in JBoss
but it doesn't work.
 
According to the instructions in artile "Running the Examples from Enterprise JavaBeans, by Richard Monson-Haefel (Unix)" 
written by Sebastien Alborini <[EMAIL PROTECTED]> in jboss manual I had ever run the examples rightly with default
configure that is DefaultDs of hypersonic.(CMP EJB)
 
Any help is important and I'm thankful.
 
Sam Liu
 

Reply via email to