Problem Fetching the primary Key Using Container Managed Persistence.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nitesh_Arora
Posted On:   Friday, April 27, 2001 10:33 PM

Dear All, I am developing the CMP using IBM Visual Age 3.5. the table to which this bean maps to uses composite primary key.the bean has been developed properly but i wish to get the values in one of the fields of the primary key for which i have specifically written the getter method both in the bean and the remote interface. but i am unable to access the method through the remote object. when trying to access the same method by running the test client in Visual Age it gives me exception Transaction Rolled Back Exception. The method that I have written in remote is - java.math.BigDecimal getCzk_document_no() throws java.rmi.RemoteException; and the corresponding method written in bean is - public java.math.   More>>

Dear All,
I am developing the CMP using IBM Visual Age 3.5. the table to which this bean maps to uses composite primary key.the bean has been developed properly but i wish to get the values in one of the fields of the primary key for which i have specifically written the getter method both in the bean and the remote interface. but i am unable to access the method through the remote object.
when trying to access the same method by running the test client in Visual Age it gives me exception Transaction Rolled Back Exception.
The method that I have written in remote is -
java.math.BigDecimal getCzk_document_no() throws java.rmi.RemoteException;

and the corresponding method written in bean is -

public java.math.BigDecimal getCzk_document_no()
{
return czk_document_no;
}

czk_document_no is the part of the primary key.

I have made a Serializable class for the composite primary keys. I have tried to access the primary key class object through the getPrimaryKey() method of the EnitityContext. It is also giving the same exception - javax.transaction.TransactionRolledBackException.

Kindly let me know how to access primary key fields through the remote object .

   <<Less
About | Sitemap | Contact