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
> 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