Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

how to persist java.nio.Buffer with javax.persistence ?

Thread view: 
Vincent Cantin - 21 Jul 2006 19:41 GMT
Hello,

I don't remember seen in any tutorial how to persist Buffers with the
Java Persistence API.

Does somebody know how to do ?
Danno - 21 Jul 2006 20:00 GMT
> Hello,
>
> I don't remember seen in any tutorial how to persist Buffers with the
> Java Persistence API.
>
> Does somebody know how to do ?

You can't, well because Buffers don't implement Serializable.  You will
need to flush that Buffer out into something Serializable like an array
and then send that information to session bean or direct to an ejb.

If you still have questions, post away. ;)
Vincent Cantin - 21 Jul 2006 20:23 GMT
Danno a écrit :
>> Hello,
>>
[quoted text clipped - 8 lines]
>
> If you still have questions, post away. ;)

Well, I plan to use a persistence mecanism in a JSE program. Is there
some alternatives to javax.persistence that enable me to persist my data
as easily as it could be ?

I still need to have some kind of entities saved separately but I also
need to have something that can embed my serializable objects like the
classic serialization. Does it exist?
Danno - 22 Jul 2006 10:07 GMT
> Danno a écrit :
> >> Hello,
[quoted text clipped - 17 lines]
> need to have something that can embed my serializable objects like the
> classic serialization. Does it exist?

You can still use the java persistence API, but you have to convert
your java.nio.Buffer to and array before doing so. ;)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.