Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330538

Summary: Support LOB streaming
Product: z_Archived Reporter: Stefan Reinhold <stefan.reinhold>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: chase
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Stefan Reinhold CLA 2010-11-18 01:40:38 EST
Build Identifier: 1.0

It would be nice to have something like OpenJPA's LOB streaming (http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html#ref_guide_streamsupport) in EclipseLink, too.

We got large files that shouldn't be loaded into memory completely. They are only read from the file system and stored into the database and later retrieved from the database and written to the file system.

Declaring and annotating a field of type InputStream or Reader where only a buffer is held in memory would be a good approach from the user's point of view.

Reproducible: Always
Comment 1 Matthieu Heimer CLA 2012-03-17 00:49:52 EDT
Here is the link to the current OpenJPA. http://openjpa.apache.org/builds/2.2.0/apache-openjpa/docs/manual.html#ref_guide_streamsupport

The OpenJPA implementation uses a proprietary annotation and persists either an InputStream or a Reader.

Hibernate also supports streams with JPA. See the information at the following locations:
http://docs.jboss.org/hibernate/core/4.0/manual/en-US/html_single/
http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html/Blob_and_Clob_support_in_EJB3.html

The Hibernate approach is to support persisting java.sql.Blob and java.sql.Clob types. Their API includes a helper createBlob method. http://docs.jboss.org/hibernate/orm/3.5/api/org/hibernate/Hibernate.html
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:07:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink