Re: [JBoss-user] Oracle sequence with CMP

2002-08-12 Thread Holger Baxmann

the bmp choice is "select mysequence.next from dual;" for oracle and in
the case of cmp the entitypersistancemanager will compute the pk.

but have a look at:

GUIDs without Singletons and Databases
http://www.theserverside.com/patterns/thread.jsp?thread_id=4976

and

CMP Primary Key Sequence Generated By Bean Self Cache
http://www.theserverside.com/patterns/thread.jsp?thread_id=5285

beware of using instance specific uid generation in a clustered
environment 

you will definetly running into inconsistence if the cluster instances
are connected into the cluster via a 'clustering backbone network' which
is out of order and they have a living database connection via the
'database backbone network' and are still up and running. so every
instance will work on its own and generate probably the same primary
keys, because they do not know about each other. the safe way is the
database roundtrip via sequence or trigger. there are serveral
strategies to reserve a bulk of pk's in one transaction and use them
subsequently - the highbyte-lowbyte pk approach to prevent database
roundtrips.

hth
bax


- Original Message -
From: "Anthony Geoghegan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 12, 2002 3:26 PM
Subject: [JBoss-user] Oracle sequence with CMP


> Is there anyway of using an Oracle sequence with CMP in JBOSS 3.0.1?
> Any indication I have is that you must use BMP
> Best Regards,
> Anthony Geoghegan.
> J2EE Developer
> CPS Ireland Ltd.
>
>
> ---
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Oracle sequence with CMP

2002-08-12 Thread Anthony Geoghegan

Is there anyway of using an Oracle sequence with CMP in JBOSS 3.0.1?
Any indication I have is that you must use BMP
Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user