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 Ilkka Priha <ip...@norther.org> on 2009/10/06 08:34:49 UTC

LOBs in OJB 1.0.5RC1

Hello

Armin's LOB handling on RC1 is really great! However, as different 
platforms treat LOBs in various ways, we would appreciate some more 
flexibility.

LobHandle, BlobHandle and ClobHandle could have a public constructor for 
transient LOBs, which would not take PersistenceBrokerInternal as a 
parameter. That would allow us to use our own transient implementations 
of LOBs together with OJB's LobHandles.

// TODO: (imp 2009-09-28) Transient handle without a persister broker.
public LobHandle(Object locator)
{
     if(locator == null)
     {
         throw new NullPointerException("The locator object may not be 
'null'");
     }
     this.locator = locator;
     isTransient = false;
     active = false;
     if(locator instanceof Lob)
     {
         isTransient = true;
         markDirty();
     }
}

RSIterator, line 533, should have a null test before calling lob.isActive().

MySQL applies emulators to LOB locators and they require primary keys in 
LOB queries. Primary keys could be added to LobHelperImpl's 
performRefreshLob() method (we've done it by subclassing).

MySQL emulators require also a specific hack for the LOB field in the 
select statement
 
http://dev.mysql.com/doc/refman/5.4/en/connector-j-reference-implementation-notes.html

We've implemented it in an extension to PlatformMySQLImpl, but using it 
requires that statements delegate their select field/column generation 
to Platform implementations. That seems to be OK, because the last phase 
of generation (getQuoteName()) is already delegated and some refactoring 
would make good for the intermediate phases, too.

JDK 1.6 extended BLOB and CLOB interfaces provide a useful free() 
method, which would be nice to have in handles.

Regards,
     Ilkka

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