I'm a newbie in Entity Beans, and I can't find the proper place to validate
the bean's attributes.
The simple way is to throw an application exception when some business rule
is broken when you set an attribute. For example
public void setQuantity(int value)
{
if (value < 0)
throw new InvalidQuantityException();
...
}
but what if the business rule needs the value of 2 or more attributes? I
don't want to throw the exception in each 'set' method because I want the
bean user to be able to set the attributes in any order.
I need some 'validate' method that must be called when the bean is
'complete'..
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".