File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes EJB HELP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB HELP" Watch "EJB HELP" New topic


vikassheel gupta
Ranch Hand

Joined: Aug 02, 2005
Posts: 53
i want to ask u in the 1:1 relation mapping in cmr ejb i am going to use remote interfaces home interfaces and i have use local home and remote interfaces but
i cant understand when the client call the findByPrimaryKey method of another bean who has foreign key that methods return type will be of local remote interface or remote interface.
bcz my error will be of:-

incompatible types; found: model.cnmas.Cnmas, required: model.cnmas.CnmasLocal

so if i put local interface then it will call the home interface create method where the datatype is of local type
so it will create a problem for me
so any one tell me how to use local interface finder method .
thanks alot

Warm Regards<br />vikassheelgupta<br />9911005168
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Do you implement the 1:1 relationship with BMP or CMP entity beans?

I think, therefore I exist -- Rene Descartes
vikassheel gupta
Ranch Hand

Joined: Aug 02, 2005
Posts: 53
i am implementing 1:1 relationship in cmp ejb with jdeveloper as IDE

tell me how to solve this problem related to primay key
or should i use the iterator like this:-

iterator i=home.findByPrimaryKey("").iterator();
Cnmas cnn=(Cnmas)PortableRemoteObject.narrow(;

or with out this like

Cnmas cnn = cnhome.findByPrimaryKey(dpwb_no);
but if i use this statement in the client side
then my problem in this case :-

1. i have multiple records in dpwb_no because primary key has multiple records retrival fine

2. second problem is home interface ka finder method call kar raahain hain and whose return type is not local type
but client will interact only through the localhome interface so pls
tell me how to do that

thanks alot
I agree. Here's the link:
subject: EJB HELP
It's not a secret anymore!