Hi Kamran, My reply was
bumped off the server so I am
resending it again 10 hours
late.
Hi
Kamran,
I
would like to point out something regarding use of remove() method on
EJBHome/EJBObject.
EJBObject : No need to use Handle here.
I think that you are not using this method. It seems that you are
calling EJBHome.remove();
EJBHomeObject: There are 2 ways to remove.
1) Use PK . home.remove(pk) - I
generally use this or EJBObject.remove()
2) home.remove(handle)
Observation: Mostly It looks fine to me except one
small suggestion.
Suggestion: Instead of using this for EQUALS check ,
try the following :
EXISTING CODE
**********************
public boolean equals(Object
obj) { if (this.getClass().equals(obj.getClass())) { ApplicationPK that = (ApplicationPK) obj; return this.appID.intValue() == that.appID.intValue(); } return false; } SUGGESTED CODE
***********************
public boolean equals(Object
obj)
{ boolean retVal = false; if ( obj instanceof ApplicationPK
)
{ ApplicationPK pk = (AddressPK) obj; retVal =
this.appID.intValue() == pk.appID.intValue(); } return retVal; }
EXISTING CODE
**********************
public
ApplicationPK() {
appID = new Integer(0); } SUGGESTED CODE
**************************
public ApplicationPK()
{
}
I
think this should solve the problem.
-Saroj
PS. was out on the weekend. That caused the late reply. And, I surely Love HOCKEY. Rarely
Miss INDO-PAK matches. Love Shahbaz and of late, Sohail
Abbas. |
Title: Message
- [JBoss-user] illegalArgumentException while removing the ent... Nayyer Kamran
- RE: [JBoss-user] illegalArgumentException while removin... Saroj Kumar
- Re: [JBoss-user] illegalArgumentException while rem... Nayyer Kamran
- RE: [JBoss-user] illegalArgumentException while... Saroj Kumar
- Re: [JBoss-user] illegalArgumentException w... Nayyer Kamran
- Saroj Kumar