Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

compound pk implementation - post your code

 
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
 
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic