It requires some creative "workarounds". It has been a thorn in my side as well.
1. You could have your business object implement the callback interface and use SQL Server numbering and requery for the new ID after the update (This requires a unique candidate key besides the PK in the object). This requires fixing a bug in OJB to allow an insert without a PK defined. 2. Use low numbering for your batch processes and high numbering for your OJB inserts. I reserve the first hundred million IDs for batch and higher for 100000000. This leaves approximately 2 billion ID for OJB using int as a key. This requires modifying OJB to declare IDENTITY INSERT ON before doing the insert. 3. Use separate tables for your batch processes and your OJB processes and union them at runtime. This also requires using reserved ID space as in #2. Also as stated in another email, you may have problems with the standard cache. I have yet to implement an expiring cache to allow the batch updates to propagate to OJB. Hope this helps. Wallace J Gelhar Facilities Planning & Management Computer Information Systems Intern [EMAIL PROTECTED] (715) 836-3411 -----Original Message----- From: Elderclei R Reami [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 8:58 AM To: [EMAIL PROTECTED] Subject: Help, my database is also accessed by legacy systems Hi Folks, OJB has been very helpful, although I don't understand it well yet :) I've implemented a small system based on struts, and using OJB for persistence. The fact is people realized now that the tables must also be feeded by batch processes, and key columns will be generated by legacy - I mean data from legacy system will be imported into the database using SQLServer 2000 DTS. I'm not sure how to deal with the SequenceManager in this situation, because my data entry will still need to provide it's own autonumbering mechanism. Any ideas on this topic? Thanks in advance. Cheers, Elderclei R Reami Vertis Tecnologia +55 11 3887-0835 www.vertisnet.com.br -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
