I am planning a design which has "String" as Primary Key. I have defined two constructors in the Primary Bean class one with String as parameter and another with no parameter. Then what shall I do with hashcode() and equals() methods. I have implemented serialisable interface. Can anyone clarify.
If String is going to be the primary key for ur entity bean, then there is no need to seperately define a primary key class. use the class of String itself, "java.lang.String".
(ahamed at aztec dot soft dot net)
Thanks for your reply. I tried in two ways.
no.1 -> using java.lang.String i.e. without having separate PK class -> If I ejb compile i get CASE_INSENSITIVE_ORDER error, i think it's telling we have to check for case if we use String.
no.2 -> using separate PK class, as per your ref. article, I get some thing like "Bean provided to weblogic RDBMS CMP system is invalid". unknown error, and it tells to check that the deployment descriptor contains well-formed XML.
I checked everthing twice, but can't figure out. can you suggest where I am going wrong.
thanks a lot
Are you sure that you clearly defined you PK class in ejb-jar.xml as in <prim-key-class>-tag?
i did check all aspects. could not figure out?
Cut and paste weblogic-rdbms-cmp.xml file and let us take a look at it.. I had a similar problem and if you leave one section out you will bomb..