Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Storing Java objects in Oracle

Re: Storing Java objects in Oracle

From: Marin Dimitrov <marin_at_sirma.bg>
Date: Tue, 19 Sep 2000 18:21:01 +0300
Message-Id: <10624.117354@fatcity.com>

> Hi,
>
> Usually when Java objects are stored in the Oracle Database te different
> attributes map to the different database column names.
> But is there are way to store the Java Object directly into the database
as
> a BLOB or something like that, so that when it is read back into the
> memory the object can be formed directly.
>

U may try to make your classes serializable (implement Serializable and overwrite

private void writeObject(java.io.ObjectOutputStream out) and private void readObject(java.io.ObjectInputStream in) )

Then get the output(input) stream of the BLOB and write to(read from) it

Of course there some complications may arise.

hth,

    Marin


"When brought to meaning, all importance becomes small, as in death, all life seems nothing. Knowing is destroyed by thinking, distilled into knowledge"

                                                 William Wharton, "Birdy"
Received on Tue Sep 19 2000 - 10:21:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US