Hi,
Once a CMP or BMP is created you can not change the
primary key field(s) of that bean. This is according
to the EJB specification. The other way of doing this
is using session bean and data access object.
bye
Keely Pavan
--- Sridhar Akula <SridharA@(protected)>
wrote:
> Hi All,
>
> Iam facing one problem with CMP bean. My requirement
> is, trying to update
> the primary key values.
> The primey key is composite(Table Field_lkp contains
> 2 columns lkp_nm and
> lkp_val which are composite key).
> From CMP how can i update PK values. When i tried to
> call set methods of
> CMP bean (setLkpName(String name), setLkpVal(String
> val)) from
> setFieldLkpData(String lkpName, setLkpValue)
>
> The following error message i got.
>
> From ManageFieldBean bean
> ::Exception::
javax.ejb.EJBException: EJB
> Exception: : java.lang.Illeg
> alStateException: [EJB:010144]The setXXX method for
> a primary key field may
> only be called duri
> ng ejbCreate.
> at
>
com.ual.dps.admin.FieldLookUpBean_dolqbk__WebLogic_CMP_RDBMS.setLkpName(FieldLookUpB
> ean_dolqbk__WebLogic_CMP_RDBMS.java:295)
>
>
> Please suggest me in such a way that i can update it
> from CMP only.
>
> Thanks in Advance.
>
> Regards,
> Sridhar
>
>
====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints:
> http://java.sun.com/blueprints/corej2eepatterns
> List Archive:
>
http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST"
> to listserv@(protected)
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)