Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Any: serialize and save in DB

0 views
Skip to first unread message

Aleksey

unread,
Nov 1, 2001, 3:37:07 AM11/1/01
to
Hi,

Can anyone give me advise, what is the most prefer way of saving Any
instances in relational database (Oracle)?

And the second question. How Any object can be serialized?
I tried to execute the following code, but received an exception (we use
Orbix2000 for Java.).

Any myAny = orb.create_any();
myAny.insert_string("some any content");
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
java.io.ObjectOutputStream oos = new java.io.ObjectOutputStream(baos);
oos.writeObject(myAny); //--- fail here

Exception:
java.io.NotSerializableException: com.iona.corba.art.artimpl.ORBDelegate
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at com.protek.wfm.unittest.TestDAO.main(TestDAO.java:44)

Thanks


Michi Henning

unread,
Nov 1, 2001, 3:25:55 PM11/1/01
to
On Thu, 1 Nov 2001, Aleksey wrote:

> Can anyone give me advise, what is the most prefer way of saving Any
> instances in relational database (Oracle)?
>
> And the second question. How Any object can be serialized?
> I tried to execute the following code, but received an exception (we use
> Orbix2000 for Java.).

Have a look at the portabel interceptor chapter in the spec. The codec
interface can be used to do this.

Cheers,

Michi.
--
Michi Henning +61 7 3324 9633
Chief CORBA Scientist +61 4 1118 2700 (mobile)
IONA Technologies +61 7 3324 9799 (fax)
Total Business Integration http://www.ooc.com.au/staff/michi

0 new messages