Hi All,
I have a CMP entity bean in which I generate the primary key using my own class know as unique id generator.
I use it in ejbCreate method in the following manner
public Long ejbCreate(HospitalData hospitalData) throws CreateException{
Long myid = new Long(UniqueIdGenerator.getId());
System.out.println("My id generated ====== "+myid);
this.hospitalid = myid;
System.out.println("My id generated ====== "+this.hospitalid);
System.out.println("Came in ejbCreate method of HospitalEJB");
this.hospitalname = hospitalData.getHospitalname();
return null;
}
Can you tell me how I map this primary key in my ejb-jar.xml and jbosscmp-jdbc.xml.
Anyhelp would be appreciated.
Thanks
Sameer