Re: AW: SequenceManagerHighLowImpl

Armin Waibel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Längerich wrote:
> Bernd "Ingrid" Laengerich wrote:
> 
>> OK, I played around a little bit and overwrote the afterStore 
>> method (empty implementation, however it never gets called!? What
>> am I missing? I placed a breakpoint in my code, but it never
>> reaches it.
> 
> OK, searching around a little bit, I found in JdbcAccessImpl:
> 
> protected void assignAutoincrementIdentityColumns(ClassDescriptor
> cld, Object target) throws SequenceManagerException { // if database
> Identity Columns are used, query the id from database // other
> SequenceManager implementations will ignore this call 
> if(cld.useIdentityColumnField())
> broker.serviceSequenceManager().afterStore(this, cld, target); }
>

sorry, I made my conclusion based on sources of latest version from SVN 
(OJB_1_0_RELEASE branch, upcoming 1.0.5). There the #afterStore method 
is always called (changes in JdbcAccessImpl, rename of methods) and a by 
the way a new constructor for SequenceManager implementations is added.

In your case (<1.0.5) you have to change/override method 
#assignAutoincrementIdentityColumns in JdbcAccessImpl too.


> This seems to be the only place where this method is called directly,
> except it is called via reflection. 

This method is only called once, no reflection.

regards,
Armin

> I will just write a refresh
> method, as the locations are countable where such inserts of alien
> data rows are used.
> 
> Bernd
> 
> 
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [email protected] For
> additional commands, e-mail: [email protected]
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.