• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB HELP

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you implement the 1:1 relationship with BMP or CMP entity beans?
 
vikassheel gupta
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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();
while(i.hasNext())
{
Cnmas cnn=(Cnmas)PortableRemoteObject.narrow(i.next().cnmas.class);
cnmas.getID();
}

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
reply
    Bookmark Topic Watch Topic
  • New Topic