Should I model this object as Entity Bean ?

Hi all !

I'm modelling an application for selling tickets on-line.

Tickets are booked on-line then the user navigates to the payment page and pays with credit card.

The business analyst decided to allow a 30 minutes reservation time for people who booked the ticket to pay with credit card.

If time elapses the seat "lock" is released.

I think there should be an EJB responsible to keep up with Seat reservations.

My dilemma is : should I model it as Session Bean or Entity Bean ?

I initially modelled it as Session Bean with plain (Insert/Update) of the Seats Table when the ticket is booked / paid / time elapsed

On the other hand I think, if there's multi-user access of the PK (SeatId),

an Entity Bean should be used.

What do you say to it ? Session Bean or Entity Bean ?

Thanks in advance

Francesco

[885 byte] By [fmarchioniscreena] at [2007-10-3 11:51:22]
# 1
Entity EJB should model business entities. Session EJB should model business workflow.
GhostRadioThreea at 2007-7-15 14:25:25 > top of Java-index,Other Topics,Patterns & OO Design...
# 2
> I think there should be an EJB responsible to keep up> with Seat reservations.Why?
SoulTech2012a at 2007-7-15 14:25:25 > top of Java-index,Other Topics,Patterns & OO Design...
# 3

> Entity EJB should model business entities.

>

> Session EJB should model business workflow.

if you must use EJBs, this is correct.

You won't want to have a session open for 30 minutes waiting for that lock to be released. How will this be performant?

%

duffymoa at 2007-7-15 14:25:25 > top of Java-index,Other Topics,Patterns & OO Design...