I used this on the Storefront application including in several chapters as 
if my memory serves me correctly, you can plugin different sequence manager 
implementations in the ojb.properties class.

Something like this I think:
SequenceManagerClass=ojb.broker.util.sequence.SequenceManagerHighLowImpl

There are several other properties that you can control as well, like are 
the ids global to all enties or does each entity have its own set. Very nice.

chuck

At 12:24 PM 7/23/2002 -0700, you wrote:
>That makes sense, I was wondering how it could handle it in a generic
>fashion.  I suppose it adds a row to the OJB_SEQ table for every table
>column that it has to autoincrement.
>
>I further suppose it could accomplish an auto-increment insert with a single
>DB call if they use a nested select from the OJB_SEQ table for the
>auto-increment column, followed by an update to the OJB_SEQ table to
>actually increment that column value, both statements executed as a single
>batch call.
>
>I'll have to check it out....thanks!
>
>peace,
>Joe
>
>-----Original Message-----
>From: Graham Lounder [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 12:08 PM
>To: Struts Users Mailing List
>Subject: RE: Struts & Persistence
>
>
>I've been using OJB for the past couple of weeks so I'm by no means an
>expert.  What I can tell you is that OJB requires an OJB_SEQ table in the
>database.  This allows OJB to hanlde autoincrementing fields on its own, and
>not on any one specific implementation.
>
>I have been using OJB with MsAccess and haven't had a problem yet (crossing
>my fingers) :-)
>
>Graham
>
>-----Original Message-----
>From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 4:04 PM
>To: Struts Users Mailing List
>Subject: RE: Struts & Persistence
>
>
>I haven't had time to play with OJB yet, but does anyone know if it works
>properly with Oracle?  I mean, I know it should work fine with any DB for
>generating select and update statements, but what about inserts when you are
>using sequence numbers?  The increments are handled differently in different
>databases, so I'm curious how OJB addresses this (if at all).
>
>thanks,
>Joe
>
>-----Original Message-----
>From: Mete Kural [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 11:42 AM
>To: Struts Users Mailing List; [EMAIL PROTECTED]
>Subject: RE: Struts & Persistence
>
>
>OJB is great. (jakarta.apache.org/ojb) You can easily
>map your tables to objects. It works with MySQL. I
>recommend that you implement DAO objects that call
>OJB's APIs and keep all the persistence operations
>there.
>
>Good luck,
>Mete
>
>--- James Mitchell <[EMAIL PROTECTED]> wrote:
> > I'll be uploading a modified version of the example
> > app (struts-example.war)
> > which uses OJB as soon as I can finish it.
> >
> > Basic O/R mapping using JDO API w/MySql on the
> > backend.
> >
> > It's not there yet, but here's the url:
> > http://sourceforge.net/projects/struts/
> >
> >
> > James Mitchell
> > Software Engineer\Struts Evangelist
> > Struts-Atlanta, the "Open Minded Developer Network"
> > http://www.open-tools.org/struts-atlanta
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Elderclei R Reami
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 23, 2002 2:54 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Struts & Persistence
> > >
> > >
> > > Hi again,
> > >
> > > Does anyone know about usage of persistence
> > frameworks, like Torque & OJB
> > > from Apache Group, with Struts?
> > >
> > > Thanks for all the help with code generation. I
> > downloaded StrutsBuilder
> > > and Eclipse+EasyStruts to evaluate and they are
> > great tools. About self-
> > > generated apps from database schema and beer...
> > Huhr! Sounds nice and we
> > > can start a new project from the idea :)
> > >
> > > Best Regards,
> > > Elder
> > >
> > > --
> > > 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]>
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Health - Feel better, live better
>http://health.yahoo.com
>
>--
>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]>
>
>
>--
>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]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to