db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Writing TestCase for Sequence Assertions
Date Thu, 15 Sep 2005 08:12:01 GMT
> *** For factory sequences (not defined in the database) is the API
> sufficient to use the sequence in the three modes: nontransactional,
> contiguous, and noncontiguous? ***

Well, the implementation has to call factory.newInstance() to create the 
sequence, but has no way of telling the factory whether it wants a 
contiguous, noncontiguous, or nontransactional sequence.

Really depends whether the users sequence that is created by the factory will 
typically be able to operate in all 3 strategies. I would guess that most 
sequences would support one of the 3 strategies, so by saying that they want 
to use a particular factory, then they are implicitly electing the strategy 
that will be used.

If it is really necessary to allow a factory to create a sequence in any of 
the 3 strategies then we could add a requirement on the factory of having a 
static newInstance(int strategy) method, and the "strategy" value specified 
in the metadata could be passed in. If the metadata has no value for strategy 
then the newInstance() method is called.

> *** Does Derby support sequences? ***

DB2, PostgreSQL, Oracle, Firebird, SAPDB, McKoi and maybe some others do. 
The JDO impl can clearly generate a sequence using other means where there is 
no native RDBMS support.


View raw message