Hi Ana,

in my opinion the business logic belongs to the entity beans. Session beans
should use this logic and bundle it in an interface which represents some
kind of lightweight use-cases for the clients (to minimize network traffic
etc.). We're designing our systems that way and it works pretty well.

Mit freundlichen Gr��en
With kind regards

> Ulf Gohde
> System Architect
> CE Computer Equipment AG      Fon: +49 (0)521 9318-167
> Herforder Str. 155a           Fax: +49 (0)521 9318-444
> 33609 Bielefeld                       mailto:[EMAIL PROTECTED]
> Germany                               http://www.ce-ag.com
>
>


-----Original Message-----
From: Bhattacharyya, Ana [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 08, 2000 12:02 AM
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".

Reply via email to