Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2ee primary key generator (158 sample test)

 
Tony Chen
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When designing a primary key generator for your J2EE application, which of the following would be the BEST option?

A. Depend on database specific key generation support, accessible through stored procedure

B. Build custom key generation engine deployed to database, accessible through stored procedure

C. Use a local primary key generation algorithm to eliminate synchronization delays

D. Use local management and delivery of centrally generated primary keys
 
Tony Chen
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Among the given choices, I believe 'A' is the best answer. And apparently this is WebLogic's preferred way of primary key generation.
The WebLogic Server EJB container allows you to automatically generated primary keys using the native automatic key generation facilities provided by Oracle or SQLServer databases.
http://edocs.bea.com/wls/docs70/ConsoleHelp/ejb_cmp20_automatickeygeneration_config.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic