You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Aaron Longwell <li...@newmedialogic.com> on 2003/06/05 06:47:57 UTC
mySQL Sequences
I'm working with mySQL 4+ and OJB's current release. I am wondering
about the preferred method for autoincrement keys in mySQL. Almost all
of my tables have an integer ID field that autoincrements in mySQL. I
also edit the databases directly (i.e. not through OJB) through other apps.
When I use the default sequence manager, it requires an OJB_HL_SEQ
table, and key generation gets a little sloppy when adding or deleting
from outside OJB. Here's what I'd like to use:
1) A sequence manager that will use mySQL's built in keying. In other
words, I'd like to set the ID field of my (new) object to null, then
store the record, and then check to see what ID it got.
2) A sequence manager that does not need additional tables to operate. I
sometimes deal with situations where I have only SELECT, UPDATE, DELETE
access on the tables I'm utilizing... and I cannot create new tables for
OJB to utilize.
The documentation seems to suggest that there is a solution to these
issues, but I can't find examples to try out. So far though, I love the
convenience of OJB. Great work!
Thanks,
Aaron Longwell
How to configure OJB with Tomcat
Posted by Lukas Severin <lu...@mindcast.se>.
I read the documentation about setting up OJB in a servlet. However I
couldnt find any instructions on how to configure connection pooling (eg
using jakarta-commons) together with OJB in Tomcat so that connections to
the database is pooled. Are there any synchronization issues to be careful
about ?
Can anyone point me to the right doc, or help me out with example tomcat
descriptors and client code ?
Thanks !