Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Blob/Large data tutorial/best practices

Thank you for link and fast reply,

  I need to store data to BLOB in my format (working with ByteBuffers, ...). Serialization is not possible.
Thank you for "@Mutable" hint. 
  I read that is supported "java.sql.Blob/java.sql.Clob" for @Lob attribute. 
So I think thats possible to write converter from my data object to "java.sql.Blob" or "byte[]".
  I will try it later.

  Martin

----- Original Message -----
From: "James Sutherland" <jamesssss@xxxxxxxxx>
To: eclipselink-users@xxxxxxxxxxx
Sent: Tuesday, February 9, 2010 3:56:00 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [eclipselink-users] Blob/Large data tutorial/best practices


See,

http://en.wikibooks.org/wiki/Java_Persistence/Basic_Attributes#LOBs.2C_BLOBs.2C_CLOBs_and_Serialization

What issue are you having specifically?  Do you have a Java object you wish
to serialize to a BLOB field?  This should be fairly straight forward, just
use the @Lob annotation and ensure you class is serializable.

What do you mean by change tracking?  If you are referring to attribute
change tracking vs deferred in EclipseLink, then you can avoid deferred when
using a serialized object by marking the mapping with @Mutable(false), and
ensuring you call the set method when making changes.

There are plenty of lob tests in EclipseLink if you wish to delv into the
test projects in SVN.


jandam wrote:
> 
> Sorry for my question,
> 
>   is there any tutorial/best practices to work with BLOBs. I need to
> convert BLOBs to java objects. So I need at least 2x size of BLOB.
> Is it possible to work with part of BLOB. Is there posibility to have BLOB
> change tracking without converting from Java object...
> 
>   Is there any URLs/books or samples/tests in EclipseLink.
> 
> Thank you
> 
>    Martin
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/Blob-Large-data-tutorial-best-practices-tp27511499p27516478.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top