Hi
i am new to this and i would like to get your advise if i got the concept right.
i need implement a simple system that do the following :
its kind of a donation system on the web.
i can have one or more donation instances which users can donate credits in to it.
when the "stash" of a donation instance reaches a certain specific amount (that number is hidden and unknown to the users) the session of this specific donation ends and you need to create a new instance of it with the same configuration.
the user that triggered the end of the session gets a prize.
quite simple i guess.

i need to implement this in an ejb solution.

i thought that i will have a stateless session bean that receives the donation from users and transfer it to a donation instance.
each donation instance will be an entity bean that will hold the amount of credits that had bean accumulated so far .

the entity bean will have a method like this :
public synchronized boolean addDonation(userId, amount) {
}
(should it be static ? )

and when a user win a prize, the session bean is creating a new entity bean instance.

this are the db tables that ill have :

DONATIONINSTANCE:
ID
NAME
DATECREATED
DATEEND
AMMOUNTTOREACH
CURRENTAMMOUNT
WINNINGUSERID

DONATIONLOGS
USERID
DONATIONINSTANCEID
AMMOUNT
DATE

USERS
USERID
NAME
BIRTHDATE
EMAIL


what do you think , is this a good design for an EJB solution ?
should i make the entity bean static ?

thanks for the help.