A
Andrea Sansottera
Hi all guys,
I'm looking for a few suggestions on ejb cmp. I'm using j2ee sdk 1.4,
pointbase database server.
1) I have too check for the values of a few properties of an entity bean
before they are stored on the database. For example, I have in my bean
class:
public abstract void setAcidity(double acidity);
but I want, for instance, acidity to be greater than -4... how can I do
this? Should I use bean managed persistance and write jdbc code for *all*
the properties of my entity bean class?
2) Again... I want to allow some method calls only to the users which have
the "employer" role, but they should also have a certain value on certain
field of a column (editable=true), otherwise the operation should not be
done... shall I do this only with bean managed persistance?
Thanks a lot, any suggestion is appreciated.
Andrea
I'm looking for a few suggestions on ejb cmp. I'm using j2ee sdk 1.4,
pointbase database server.
1) I have too check for the values of a few properties of an entity bean
before they are stored on the database. For example, I have in my bean
class:
public abstract void setAcidity(double acidity);
but I want, for instance, acidity to be greater than -4... how can I do
this? Should I use bean managed persistance and write jdbc code for *all*
the properties of my entity bean class?
2) Again... I want to allow some method calls only to the users which have
the "employer" role, but they should also have a certain value on certain
field of a column (editable=true), otherwise the operation should not be
done... shall I do this only with bean managed persistance?
Thanks a lot, any suggestion is appreciated.
Andrea