It took us a while but we finally got a small set of apps to demonstrate
Session bean, BMP entity, and CMP entity all working with IB6. The problems
were all with the setup. You must get all the pieces exactly right or it
won't work. Some of the docs on the jboss site are out of date and will
steer you in the wrong direction.

This is the relevant stuff for a cmp entity bean:

1-add driver name to jboss.properties file

jdbc.drivers=org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,interb
ase.interclient.Driver

2-add mlet to jboss.

<MLET CODE="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,
interclient.jar" CODEBASE="../../lib/ext/">
    <ARG TYPE="java.lang.String" VALUE="IBasePool">
    <ARG TYPE="java.lang.String"
VALUE="org.jboss.minerva.xa.XADataSourceImpl">
</MLET>

3-add mbean to jboss.jcml (note you don't have to include all this info,
jboss will fill in the rest)

  <mbean name="DefaultDomain:service=XADataSource,name=IBasePool">
       <attribute name="Properties"></attribute>
       <attribute
name="URL">jdbc:interbase://maynard/c:/interbase/database/privacy.gdb</attri
bute>
       <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>

4-add datasource name to jaws.xml in your deploy file (docs may say that
this should be xa.IBasePool, ignore them)

     <datasource>IBasePool</datasource>
     <type-mapping>InterBase</type-mapping>


5-add entity bean to ejb-jar.xml in your deploy file (note ref to ibasepool
in datasource)
       <entity>
         <description>Testing CMP</description>
         <display-name>ServiceCMP</display-name>
         <ejb-name>ServiceCMP</ejb-name>
         <home>com.yourcompany.ServiceCMPHome</home>
         <remote>com.privacyright.permission.ServiceCMP</remote>
         <ejb-class>com.yourcompany.ServiceCMPBean</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>java.lang.Integer</prim-key-class>
         <reentrant>False</reentrant>
       <cmp-field><field-name>id</field-name></cmp-field>
       <cmp-field><field-name>name</field-name></cmp-field>
        <primkey-field>id</primkey-field>
       <resource-ref>
         <res-ref-name>IBasePool</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
       </resource-ref>
       </entity>

That should do it. follow these 5 and your bean should work. If you still
have problems, let me know.

Ed


-----Original Message-----
From: Jonathan Ackerman [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 14, 2001 6:24 PM
To: '[EMAIL PROTECTED]'
Subject: [jBoss-User] JBoss and Interbase


Hi All,

Has anyone been able to get JBoss and Interbase to work together ?

I'm trying to write a BMP entity bean. Whenever my ejbLoad() method is
called I get a "java.sql.SQLException: Table not found: xxxx" exception
message. 

Now I've double checked the table and it is there. I also wrote a small Java
app running the same query to test it and the query works fine from the app.

I even tried a different database and table but still had the same problem !

Does anyone have any ideas ?

Thanks

Jonathan

-------------------------------------------------------------------
Jonathan Ackerman         Senior Consultant
Optimation                Phone:  +64 9 3075567
L4, Optimation House,     Fax:    +64 9 3097919
43 College Hill Rd,       Mobile: +64 25 319307
Auckland,                 mailto:[EMAIL PROTECTED]  
New Zealand               http://www.optimation.co.nz/



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to