Are the rules that are used in the validation logic candidates for entity
beans themselves?
There is nothing wrong with making the session bean a "manager" or
"controller" object. But perhaps the IO that it does could be factor into
some supporting entities that provide access to the rule data.
If you can share more about the nature of the validation/rule date, perhaps
we can offer better opinions on whether they are candidates for beans.
Regards,
-Chris.
> -----Original Message-----
> From: Bhattacharyya, Ana [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, March 07, 2000 5:52 PM
> To: [EMAIL PROTECTED]
> Subject: session & entity beans
>
> Hi
> I am developing a Troubleticketing system using EJB & WLS 5.0. I have some
> design questions here. I am using both entity and session beans. I am
> modeling the TroubleTicket as an Entity bean --- but while registering a
> troubleticket or deleting a ticket there a lot of business validation
> needs
> to be done. So I was wondering where to put the validations -- the
> validations require databse access also --- will I make a session
> bean(sort
> of TTManager) to wrap around the entity bean which does all these
> validations and then delegates the call to the entity beans ie like a
> create() method on the Sesion bean does some validations and calls the
> entity beans create(). But again that will undermine the importance of
> entity beans --- as they just become store house of SQLs without any
> logic.
>
> Now what is the correct way of modelling the system --- where does the
> business logic belong to --- the entity or session bean or both. If anyone
> takes a look at the commerce server design of a Trouble tickting system
> ---
> they have kept a TTmanager session bean to *manage* the TT entity beans
> ---
> by managing they do all purging and creating and selecting TTs. Now that
> is
> just the API --- for purging also u need validation --- whether the ticket
> is closed or not sort of.... -- so where to do them??? the TTmanagers
> purgeall definitely should call the remove of entity TT --- now whether
> the
> remove does the validation or the sesssion bean does the validation and
> then
> call remove is the question.
>
> Can anyone throw some light on this session-entity design issue.
> TIA
> Anamitra
>
> ==========================================================================
> =
> 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".
===========================================================================
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".