Results 1 to 1 of 1
- 09-03-2008, 09:04 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 1
- Rep Power
- 0
advise on designing an ejb application
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.
Similar Threads
-
Launching an application from another application dynamically
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:31 PM -
Launching an application from another application using thread
By Java Tip in forum Java TipReplies: 0Last Post: 02-16-2008, 09:29 PM -
give me a advise
By sireesha in forum New To JavaReplies: 3Last Post: 12-11-2007, 01:38 AM -
how to use JTA for application
By mary in forum Advanced JavaReplies: 1Last Post: 07-13-2007, 04:34 PM -
Help, GUI Application
By Felissa in forum AWT / SwingReplies: 2Last Post: 07-04-2007, 08:19 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks