1 Reply Latest reply on Feb 14, 2002 8:15 AM by alci

    JBoss castor-Jdo session bean example?

    pding

      Hi,
      Can anybody tell me where I can download the example? The http://www.jboss.org/developers/jboss-castor.jsp apparently
      give an error link. I tried to use the Jboss CastorJDO integration, but don't know I should create a DataSource for my Oracle database or place it in a database connection pool. I tested to place my database in a connection pool, but got a nullpointer exception when do
      jdo.getDatabase(). Does anyone has the similar experience?
      Thanks in advance for your help?

        • 1. Re: JBoss castor-Jdo session bean example?
          alci

          Hi,

          I have got jboss-castorjdo working with Postgresql.

          What I did is :

          1) load the jdbc driver in jboss using jboss.jcml mbean org.jboss.JdbcProvider


          org.hsqldb.jdbcDriver,your.driver.Class
          //put your driver here, org.postgresql.Driver for example




          2) configure the DataSource with :


          MyDS

          org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
          //here you can use your drivers XADataSource class instead

          ...
          Attributes depending on you driver.

          3) Add the castor-jdo mbean :



          name="Configuration">file:../conf/default/database.xml

          jdo/someName
          0
          false
          false
          false
          true


          4) Add you database.xml and mapping files in the right place (jboss_home/conf/default in the example)

          That should work...
          May I also advice you to spend 10$ for the commercial jboss doc, which will give you invaluable informations (at least, this was the case for me !)

          Good luck

          Franck