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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to