-
1. Peace of cake.
ko5tik Mar 20, 2002 11:34 AM (in response to porkkodi)What about creation of "SequeneEJB", which will generate
those numbers for you.
They are indexed using bean names, and every bean having
need in sequence number could call up this sequene EJB for a new ID
Alternative would be to specify some environment variable in DD for a bean in question.
I also wrote some utility clases which perform necessary lookup and makes programming really easy ( basically
calling static method on utility class ) -
-
3. Re: Peace of cake.
alice_adler01 Mar 20, 2002 8:00 PM (in response to porkkodi)I guess what Konstantin means is that u can create an EJB (session) that u can name as equenceEJB. This bean will have a method getId() that will actually talk to the DB to get a sequence number (from a pre-defined DB sequence).
-
4. Re: Peace of cake.
lasterra Mar 20, 2002 9:03 PM (in response to porkkodi)there is a good code example in theserverside.com
http://www.theserverside.com/books/EJBDesignPatterns/index.jsp
I Think that you have to be registered to download the code, but it's free.
Good Luck, Enrique