Hi all,
I am using jboss3.2.0RC3, jdk1.3.1_06, database Hypersonic.
 
My application description
-BeanA and BeanB have a One to Many relationship (A has many of B)
-pk1 is primary key of BeanA
-pk1 and pk2 is the compound primary key of BeanB
-pk2 in BeanB is also a foreign key which realizes the relation with BeanA
-Primary key class of BeanA is PkClassA
-Primary key class of BeanB is PkClassB
-PkClassB inherits PkClassA
-both beans are CMP
-both beans have  <transaction-type>Container</transaction-type>
-both beans have <trans-attribute>Required</trans-attribute> for all methods
 
think there is a bug in the cmr procedure which returns the collections of B related to A.
The bug is not sistematic and sometimes the getCmr procedure works properly.
 
 
--Used configuration for both beans
jbosscmp-jdbc.xml
    <read-ahead>
    <strategy>none</strategy>
    </read-ahead>
jboss.xml
    <container-configuration extends="Standard CMP 2.x EntityBean">
    <container-name>Order Container</container-name>
    <commit-option>C</commit-option>
    </container-configuration>
 
--Description of the problem
    B1.remove()  //the B1 instance related to A is correctly deleted from B table on database
    A.getBs()   //returns a collection of Bs where the primary key of the B1 removed instance is still present, and the code fails trying to read a bean with a not existing primaryKey
javax.ejb.NoSuchObjectLocalException: Entity not found: primaryKey=76 - 78
 
It seems that the reference to the deleted instance is still present in the cache.
 
 
Changing container type problem changes but still remains:
 
--Used configuration for both beans
jbosscmp-jdbc.xml
    <read-ahead>
    <strategy>none</strategy>
    </read-ahead>
jboss.xml
    <container-configuration extends="Instance Per Transaction CMP 2.x EntityBean">
    <container-name>Order Container</container-name>
    <commit-option>C</commit-option>
    </container-configuration>
 
--Description of the problem
B1.remove();  //the B1 instance is correctly deleted from B table on database
collection = A.getBs(); //returns a collection of Bs where the removed instance is not anymore present
while (iteration on the collection) {
  Bx.setCmpField (value); //a cmp field for all remaining B instance related to A is set
}
field = Bx.getCmpField() // the field has a value different from the value set in the cycle
 
It seems that the reference to the deleted instance is correctly not present in the returned collection but setCmp procedure of B does not update correctly a remaining B instance related to A.
 
 
I have tried also other combination of commit option and container type but problem remains.

Is it a known problem?
Any idea of configurations or work-around that can help?
 
 
Thanks
Morena
e-mailto: [EMAIL PROTECTED]

Reply via email to