You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Nathaniel Reed <na...@seastore.jpl.nasa.gov> on 2001/12/10 23:04:38 UTC

Id broker problem

I'm using Turbine 2.1 on the Ingres RDBMS.

Is there a way to force the ID broker to generate sequential keys for my
table?  For some reason, it "jumps" to a higher number whenever I
restart the application and then create another object.  If the sequence
starts at 100, for instance, I create 100, 101, and 102, then if I
restart the next object I create has id 120.  What's going on?

Nate

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Native idbroker in TDK1.2 [Was:Re: Id broker problem]

Posted by Colm McCartan <co...@owl.co.uk>.
Hello all,

In connection with this and other idBroker queries - how much of the 
TDK1.2 source needs to be altered to allow the use of idMethod="native"?

Clearly my TDK1.2 torque MapBuilder.vm needs refreshed and I imagine a 
bunch of the base peer classes would need it also - does anyone have any 
experience of updating this part of the code alone or are there too many 
dependencies?

Cheers,
colm


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Id broker problem

Posted by Nathaniel Reed <na...@seastore.jpl.nasa.gov>.
Thanks for the tips as always... I will try this, but do you think this is a "hack" since
this (sequence generation) is not what keys are intended for?  See my other post please
(coming soon).

"we welcome additions to the documentation."

This is truly open-source. :)  I will try to throw my contribution in at some point; just
too busy trying to meet deadlines (aren't we all?)

Nate

John McNally wrote:

> you can set
> database.idbroker.cleverquantity=false
> and then set the Quantity=1 in ID_TABLE for tables which the skipped
> pk's are an issue.
>
> this has the same effect as the prefetch property, but is more
> granular.  The prefetch property has been around for a while, but maybe
> it is not in the released version.
>
>
>
> john mcnally
>
> Nathaniel Reed wrote:
> >
> > Any other ideas??
> >
> > I found "" (which I changed to false, & I don't
> > think there is a "DatabaseService") in TR.props, so I added
> >
> > database.idbroker.prefetch=false
> >
> > but the problem I describe persists.  I think this is a non-existant property as far
> > as Turbine is concerned -- are you sure it is used and if so, which class uses it?
> >
> > I was scanning the code (IDBroker.java) and cannot determine how the IDBroker is
> > configured, since the only apparent access is through method calls from TableMap,
> > which is accessed through DatabaseMap, which is accessed by TurbineDB, a service
> > which uses the "database.<propname>" properties for obtaining JDBC connections in
> > TR.props.  Other than the connection info, I cannot determine how the TR.props are
> > used by TurbineDB.
> >
> > All these wonderfully sophisticated design patterns obscure the most basic
> > information about how to configure basic Turbine services/utilities.  I would think
> > should be a top priority in the documentation...
> >
> > Nate
> >
> > John McNally wrote:
> >
> > > idbroker grabs a series of ids and keeps the count in memory until the
> > > range is used up.  If all the ids are not handed out before the app is
> > > stopped there will be gaps.  There is no attempt to keep these
> > > sequential as this should be unimportant in a pk.  However if you do not
> > > want to cache you can use
> > >
> > > <services.DatabaseService>.<database.>idbroker.prefetch=false
> > >
> > > and id's will be grabbed from the db one at a time on an as needed
> > > basis.  the stuff in <> are guesses and/or optional, look for it (or one
> > > like it) in TR.props.
> > >
> > > john mcnally
> > >
> > > Nathaniel Reed wrote:
> > > >
> > > > I'm using Turbine 2.1 on the Ingres RDBMS.
> > > >
> > > > Is there a way to force the ID broker to generate sequential keys for my
> > > > table?  For some reason, it "jumps" to a higher number whenever I
> > > > restart the application and then create another object.  If the sequence
> > > > starts at 100, for instance, I create 100, 101, and 102, then if I
> > > > restart the next object I create has id 120.  What's going on?
> > > >
> > > > Nate
> > > >
> > > > --
> > > > Nate Reed
> > > > Physical Oceanography Distributed Active Archive Center
> > > > Jet Propulsion Laboratory (Raytheon)
> > > > nate@seanet.jpl.nasa.gov
> > > > (626) 744-5528
> > > > (626) 744-5506
> > > >
> > > > --
> > > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> > --
> > Nate Reed
> > Physical Oceanography Distributed Active Archive Center
> > Jet Propulsion Laboratory (Raytheon)
> > nate@seanet.jpl.nasa.gov
> > (626) 744-5528
> > (626) 744-5506
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Id broker problem

Posted by John McNally <jm...@collab.net>.
you can set 
database.idbroker.cleverquantity=false
and then set the Quantity=1 in ID_TABLE for tables which the skipped
pk's are an issue.

this has the same effect as the prefetch property, but is more
granular.  The prefetch property has been around for a while, but maybe
it is not in the released version.

we welcome additions to the documentation.

john mcnally


Nathaniel Reed wrote:
> 
> Any other ideas??
> 
> I found "" (which I changed to false, & I don't
> think there is a "DatabaseService") in TR.props, so I added
> 
> database.idbroker.prefetch=false
> 
> but the problem I describe persists.  I think this is a non-existant property as far
> as Turbine is concerned -- are you sure it is used and if so, which class uses it?
> 
> I was scanning the code (IDBroker.java) and cannot determine how the IDBroker is
> configured, since the only apparent access is through method calls from TableMap,
> which is accessed through DatabaseMap, which is accessed by TurbineDB, a service
> which uses the "database.<propname>" properties for obtaining JDBC connections in
> TR.props.  Other than the connection info, I cannot determine how the TR.props are
> used by TurbineDB.
> 
> All these wonderfully sophisticated design patterns obscure the most basic
> information about how to configure basic Turbine services/utilities.  I would think
> should be a top priority in the documentation...
> 
> Nate
> 
> John McNally wrote:
> 
> > idbroker grabs a series of ids and keeps the count in memory until the
> > range is used up.  If all the ids are not handed out before the app is
> > stopped there will be gaps.  There is no attempt to keep these
> > sequential as this should be unimportant in a pk.  However if you do not
> > want to cache you can use
> >
> > <services.DatabaseService>.<database.>idbroker.prefetch=false
> >
> > and id's will be grabbed from the db one at a time on an as needed
> > basis.  the stuff in <> are guesses and/or optional, look for it (or one
> > like it) in TR.props.
> >
> > john mcnally
> >
> > Nathaniel Reed wrote:
> > >
> > > I'm using Turbine 2.1 on the Ingres RDBMS.
> > >
> > > Is there a way to force the ID broker to generate sequential keys for my
> > > table?  For some reason, it "jumps" to a higher number whenever I
> > > restart the application and then create another object.  If the sequence
> > > starts at 100, for instance, I create 100, 101, and 102, then if I
> > > restart the next object I create has id 120.  What's going on?
> > >
> > > Nate
> > >
> > > --
> > > Nate Reed
> > > Physical Oceanography Distributed Active Archive Center
> > > Jet Propulsion Laboratory (Raytheon)
> > > nate@seanet.jpl.nasa.gov
> > > (626) 744-5528
> > > (626) 744-5506
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> --
> Nate Reed
> Physical Oceanography Distributed Active Archive Center
> Jet Propulsion Laboratory (Raytheon)
> nate@seanet.jpl.nasa.gov
> (626) 744-5528
> (626) 744-5506
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Id broker problem

Posted by Nathaniel Reed <na...@seastore.jpl.nasa.gov>.
Any other ideas??

I found "database.idbroker.cleverquantity=true" (which I changed to false, & I don't
think there is a "DatabaseService") in TR.props, so I added

database.idbroker.prefetch=false

but the problem I describe persists.  I think this is a non-existant property as far
as Turbine is concerned -- are you sure it is used and if so, which class uses it?

I was scanning the code (IDBroker.java) and cannot determine how the IDBroker is
configured, since the only apparent access is through method calls from TableMap,
which is accessed through DatabaseMap, which is accessed by TurbineDB, a service
which uses the "database.<propname>" properties for obtaining JDBC connections in
TR.props.  Other than the connection info, I cannot determine how the TR.props are
used by TurbineDB.

All these wonderfully sophisticated design patterns obscure the most basic
information about how to configure basic Turbine services/utilities.  I would think
should be a top priority in the documentation...

Nate

John McNally wrote:

> idbroker grabs a series of ids and keeps the count in memory until the
> range is used up.  If all the ids are not handed out before the app is
> stopped there will be gaps.  There is no attempt to keep these
> sequential as this should be unimportant in a pk.  However if you do not
> want to cache you can use
>
> <services.DatabaseService>.<database.>idbroker.prefetch=false
>
> and id's will be grabbed from the db one at a time on an as needed
> basis.  the stuff in <> are guesses and/or optional, look for it (or one
> like it) in TR.props.
>
> john mcnally
>
> Nathaniel Reed wrote:
> >
> > I'm using Turbine 2.1 on the Ingres RDBMS.
> >
> > Is there a way to force the ID broker to generate sequential keys for my
> > table?  For some reason, it "jumps" to a higher number whenever I
> > restart the application and then create another object.  If the sequence
> > starts at 100, for instance, I create 100, 101, and 102, then if I
> > restart the next object I create has id 120.  What's going on?
> >
> > Nate
> >
> > --
> > Nate Reed
> > Physical Oceanography Distributed Active Archive Center
> > Jet Propulsion Laboratory (Raytheon)
> > nate@seanet.jpl.nasa.gov
> > (626) 744-5528
> > (626) 744-5506
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
Nate Reed
Physical Oceanography Distributed Active Archive Center
Jet Propulsion Laboratory (Raytheon)
nate@seanet.jpl.nasa.gov
(626) 744-5528
(626) 744-5506



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Torque] Bug ?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/17/01 2:03 AM, "Ian Lim" <ma...@ematic.com> wrote:

> Hi
> 
> Here's something to take note...
> 
> I grabbed Torque from its CVS version and tried to do
> a test run. It seems that the properties in build.properties
> are not unable to be read into the context.
> 
> As a result, $basePrefix remain $basePrefix and not the
> default Base.
> 
> I switched to Velocity 1.2 and all the problems are gone.
> Of course, some tweaking to put in logkit.jar to enable
> Velocity 1.2 to go into the action.

There should have also been a complete jar (velocity-dep-1.2.jar) in the
distribution that wouldn't require that

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[Torque] Bug ?

Posted by Ian Lim <ma...@ematic.com>.
Hi

Here's something to take note...

I grabbed Torque from its CVS version and tried to do
a test run. It seems that the properties in build.properties
are not unable to be read into the context.

As a result, $basePrefix remain $basePrefix and not the
default Base.

I switched to Velocity 1.2 and all the problems are gone.
Of course, some tweaking to put in logkit.jar to enable
Velocity 1.2 to go into the action.

Regards
==========
Ian Lim
email: mallim_sg@yahoo.com.sg
homepage: http://www.webappcabaret.com/mallim





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Id broker problem

Posted by John McNally <jm...@collab.net>.
idbroker grabs a series of ids and keeps the count in memory until the
range is used up.  If all the ids are not handed out before the app is
stopped there will be gaps.  There is no attempt to keep these
sequential as this should be unimportant in a pk.  However if you do not
want to cache you can use 

<services.DatabaseService>.<database.>idbroker.prefetch=false

and id's will be grabbed from the db one at a time on an as needed
basis.  the stuff in <> are guesses and/or optional, look for it (or one
like it) in TR.props.

john mcnally

Nathaniel Reed wrote:
> 
> I'm using Turbine 2.1 on the Ingres RDBMS.
> 
> Is there a way to force the ID broker to generate sequential keys for my
> table?  For some reason, it "jumps" to a higher number whenever I
> restart the application and then create another object.  If the sequence
> starts at 100, for instance, I create 100, 101, and 102, then if I
> restart the next object I create has id 120.  What's going on?
> 
> Nate
> 
> --
> Nate Reed
> Physical Oceanography Distributed Active Archive Center
> Jet Propulsion Laboratory (Raytheon)
> nate@seanet.jpl.nasa.gov
> (626) 744-5528
> (626) 744-5506
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>