> I have few entity Beans which correspond to DB records .
> I have few rules to be executed before executing every Insert, Delete
> and Update statement.
[...]
> Can I implement these rules in a bean,let's say "RulesBean", so that
> before executing any SQL statment, every bean will execute methods of this
> RulesBean ?
There might be vendor specific ways to this automatically, but not with EJB
in general. I'd guess you have to invoke the rules explicitly before (and
perhaps after) each SQL statement in your code. (Hey, you could generate
these calls, but I'm not a great fan of all those code generators...)
You could probably use a stateless session bean for your purpose, but then
it depends on the requirements. Also, at least some container vendors don't
support calling session bean methods from entity beans.
> But the problem here is certain SQL statements have to be executed as
> part of the Rules.
When it's not done automatically, this problem goes away. Just don't invoke
the rules if you don't want to.
Hasko Heinecke
===========================================================================
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".