You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Armin Waibel <ar...@apache.org> on 2004/09/14 18:59:46 UTC

[OJB 1.1] New batch handling

Hi all,

the first version of the new batch handling is in CVS now.

Oleg and me completely rewritten the batch handling (some month ago, but
now it's checked in ;-)). In the new version batch operations are
handled on kernel-level instead of connection level (via connection and
statement proxy classes) in old version.

The batch handling was configurable by a new element 'batch' in 
repository.dtd. There are to main classes for batch handling
- BatchManager
an extension of JdbcAccess. Check if an object is "batchable", do the 
work when execute batch was called

- BatchStrategy
Contains the rules to order/reorder objects

Both classes are pluggable and two different BatchStrategy currently 
exist (BatchStrategyDefaultImpl and BatchStrategyLeafImpl).

I don't update/write docs yet, but I will try to write it in nexts weeks.

regards,
Armin



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [OJB 1.1] New batch handling

Posted by Brian McCallister <mc...@forthillcompany.com>.
On Sep 14, 2004, at 1:41 PM, Armin Waibel wrote:

> The order/reorder is only in relation to batch handling. It does not 
> really reorder the objects only the position of the prepared statement 
> in the batch queue or execute the batch (e.g. when an insert and 
> update statement was done to the same table, then we should first 
> perform the insert, then the update statement).

Okay, was hoping to somehow magically get write-behind statement 
re-ordering for maintaining relation integrity on 1:N's

-Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [OJB 1.1] New batch handling

Posted by Armin Waibel <ar...@apache.org>.
Brian McCallister wrote:

> On Sep 14, 2004, at 12:59 PM, Armin Waibel wrote:
> 
>> - BatchStrategy
>> Contains the rules to order/reorder objects
> 
> 
> Does this properly handles the FK / PK assignment across the various 
> cases (want to make sure I understand it)? If so I dearly want to rip 
> out the re-ordering I put into the Dirty* stuff. I am not comfortable 
> with it, and don't want to have multiple re-ordering implementations in 
> OJB.
>

The order/reorder is only in relation to batch handling. It does not 
really reorder the objects only the position of the prepared statement 
in the batch queue or execute the batch (e.g. when an insert and update 
statement was done to the same table, then we should first perform the 
insert, then the update statement).
And as BatchStrategy is pluggable each implementation can use it's own 
'algorithm' to avoid integrity conflicts in DB.

regards,
Armin

> -Brian
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: [OJB 1.1] New batch handling

Posted by Brian McCallister <mc...@forthillcompany.com>.
On Sep 14, 2004, at 12:59 PM, Armin Waibel wrote:

> - BatchStrategy
> Contains the rules to order/reorder objects

Does this properly handles the FK / PK assignment across the various 
cases (want to make sure I understand it)? If so I dearly want to rip 
out the re-ordering I put into the Dirty* stuff. I am not comfortable 
with it, and don't want to have multiple re-ordering implementations in 
OJB.

-Brian



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org