While I agree that a primary key should be something very carefully 
selected, I also think that making the user code the generation is what the 
idea of the MBean is trying to get around.  There are a lot of things that 
should go into creating a good generator, some of which the average user 
may not even think of.    As such I think that having the user themselves 
code the generation part might not prove very helpful.  What might be 
better is if you could give the bean a rule set of some sort describing the 
key.  This would make the user think about how s/he wanted the key, but 
would leave the actual management of the generation up to the bean.

At 06:44 PM 1/15/2001, you wrote:

>I don't think including an MBean pre-packaged to do this is a good 
>move.  The primary key of a table should be fairly carefully picked, and 
>providing a key generator is encouraging people to use inappropriate 
>primary keys.
>
>How about providing an MBean which has _facilities_ for PK generation, but 
>which requires the developer to provide a delegate class to do the actual 
>generation?  So it deals with all the JMX stuff, exposes itself via RMI, 
>has a standard interface for getting an Object PK, but doesn't do any 
>generation, just takes the name of a class to use as a generator as a 
>parameter, loads that and then delegates generation to it?
>
>Just my $0.02
>--
>Tom Cook
>Systems Development
>Australian Submarine Corporation
>Mersey Road
>Outer Harbour

Chad La Joie                           "Only a man who can not conquer
IT Specialist                             his deficiencies feels the need to
IS&C - WARD                              convince the world he has none"



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to