Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compound pk implementation - post your code

 
Van Nguyen
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
For the life of me, I haven't been able to get my CMP bean to work using a compound key. I'm confident my PK class is correct, it's my bean class that I have some confusion about. What do your abstract getters and setters look like? (if my pk is composed of 2 Strings
- do the abstract getter/setter affect the String? or the PK class? example:
public abstract void setName(String name);
public abstract String getName();
public abstract void setTitle(String title);
public abstract String getTitle();
or
public abstract void setEmployeePK(EmployeePK pk);
public abstract EmployeePK getEmployeePK();
Does anyone have cmp bean code that has a compound class what works on the RI?
If so please post your Bean and BeanPK src and anything "special" you had to do via the deploytool to get this working. I keep getting a CORBA error(vague) when I try to do a create.
thanks,
Van
 
Van Nguyen
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I got it to work. The abstract getters/setters should affect the String and not the class. I was reaching when I tried it on the PK class. Now can someone explain to me why this works:
- in my ejbCreate(String,String) I called the abstract setter directly - this causes a CORBA error
- i changed the call inside ejbCreate to call my own setter which in turns calls the abstract setter - this works! of course, but shouldn't you be able to also call the abstract setter directly from ejbCreate?!!!
-thanks,
Van
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic