Hi, Someone has asked me this question so I thought I'd pass it on.
Currently for primary key generation we're using a pattern described in the "EJB Design Patterns" book. http://www.theserverside.com/books/EJBDesignPatterns/index.jsp In brief - the entity bean in question will query a stateless session bean for the next PK. - The stateless session bean has a "block" of numbers available and returns the next number in the block. - If the session bean's block has been used up, it will create a new block by requesting the latest PK from a sequence table in the database (via an entity bean), and incrementing this value. It seems to work very well so far. The interaction with the DB is kept to a minimum due to the caching of PKs using the stateless session bean and it is not possible to duplicate keys in a clustered environment because each stateless session bean holds a unique block (taken from the database). My question is this. How does this compare to using JBoss's own PK generator class? Might the JBoss solution offer a more efficient option? AND... how might this compare to, say, Weblogic's autoprimarykey option. Any information greatly received. Thanks, Tim ___________________________________________ emuse technologies Hanover Quay Dublin 2 Ireland Tel: 353-1-671-7317 Fax: 353-1-671-7319 website: <http://www.emusetechnologies.com/> email: <mailto:[EMAIL PROTECTED]> ___________________________________________ This message has been scanned for viruses using GroupShield 4.5 for Exchange Server 5.5 CONFIDENTIALITY NOTICE - The information contained in this email message is intended only for confidential use of the named recipient. If the reader is not the intended recipient or the person responsible for delivering it to the recipient, you are hereby notified that you have received this communication in error and that any review, dissemination or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately. ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user