openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Created: (OPENJPA-130) Streaming LOB support
Date Wed, 07 Feb 2007 19:28:05 GMT
Streaming LOB support

                 Key: OPENJPA-130
             Project: OpenJPA
          Issue Type: New Feature
          Components: jdbc, jpa, kernel, datacache
            Reporter: Patrick Linskey

BLOB and CLOB fields can only be mapped in their entirety in OpenJPA. It would be nice to
support fields of type (for BLOBs) and (for CLOBs).

The usage pattern could look like so:

public class Employee {
    private InputStream photoStream;

    public void setPhotoStream(InputStream in) {
        photoStream = in;

    public InputStream getPhotoStream() {
        return photoStream;

So, when the user wants to provide a stream, she will set the InputStream field, and when
the user wants to obtain a stream, she will use the field.

The behavior of such an implementation would be a bit different than how other fields work,
in that if the user set the stream and then consumed it within a single transaction, presumably
no data would be written out to the database at commit time. But that is the nature of streams.

(FTR, I think that I stole this idea from an email Craig Russell sent out years ago.)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message