geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmcad...@sluggy.com
Subject Design Questions on Automatic Key Generation
Date Mon, 05 Jan 2004 15:22:55 GMT
I originally posted this to OpenEJB-dev; but the traffic is pretty light on that
list.  Cross-posting with the hopes that the geronimo people have feedback...


I'm trying to not make my own unilateral decisions on this design, so 
hopefully the group/community will have feedback.   Currently I'm 
putting together a test set of EJBs which run on Weblogic & JBoss using 
said app servers' auto-key-gen supports within CMP 2.0 (it should be 
generic EJB, server specific cmp-rdbms.xml files; the goal obviously 
being ultimately to get said EJBs to deploy within Nova.  My first pass 
will be to support PostgreSQL, MySQL, and Sybase ASE 12.5.x (12.5.1 
specifically, as that's all I have available since we dropped 11.9.2 at 
work) [MS-SQL should work with the Sybase code too, as Weblogic's SQL 
Server support works with Sybase due to the shared code base].

With Weblogic unfortunately I'll only be able to test SQL Server/Sybase.

The thought, based on my own gleanings and brief on-list conversations 
with Jeremy Boynes lean towards building a set of ?factory managed? 
plugins based on a common interface for AutoKeyGen;  I think Nova could 
ship with support for a set of Databases, but should allow users to 
create their own plugins easily by implementing 
org.openejb...CMPAutoKeyGen (Or whatevfer I call it).  The plugins 
should also define whether the server managed primary key is 
overridable (For example, if I recall correctly, you can manually set a 
MySQL autoincrement field, but Sybase does not allow identitys to be 
manually set...)

I have to check the specs, but from what I recall from the EJB Books 
I've read, it seems like the proper place to insert to set/get the key 
is after ejbCreate but  before ejbPostCreate... Am I wrong in this?  
What is the standard operating procedure?

I also have to think about, as Jeremy recommended, generic 
methodologies for Key Generation.  As I see it there are two types of 
generation we should support - database managed, such as creating a 
generic sequence table or calling a key generation stored proc (there 
is a common one we use at work for Sybase, as before 12.5 [which we 
just upgraded to] there were issues with Identitys and key gap from 
what I'm told), and container managed - where we keep a keyset in 
memory and generate our own keys.

I'm looking for feedback here - I don't want to just jump in this by 
myself and go in completely the wrong direction.

I'll publish a copy of my test ejbs to one of my sites (probably 
twodot.org) when they're done, and keep progress updates on keygen.  I 
still haven't played with Nova extensively past building it and looking 
at the code, so can anyone give me an update on just how much is 
complete in CMP 2.0 support?



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
http://OpenEJB.sf.net
OpenEJB-development mailing list
OpenEJB-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openejb-development

----- End forwarded message -----




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

Mime
View raw message