Re: JDBCPropertySet

"Pat Lightbody" <[email protected]>
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <05a101c315c8$ef9dbb00$6901a8c0@moose>
I'd also recommend submitting all patches to jira, then w can properly look
through them.

-Pat

----- Original Message -----
From: "Hani Suleiman" <[email protected]>
To: <[email protected]>
Sent: Thursday, May 08, 2003 9:05 AM
Subject: Re: [Opensymphony-developers] JDBCPropertySet


> this handling is already in place for type DATA, doesn't that solve
> your needs? The correct fix I think would be to change OBJECT handling
> to be the same as DATA, rather than adding more code to reading/write
> byte[]
>
> On Thursday, May 8, 2003, at 04:37 AM, [email protected]
> wrote:
>
> > Hello,
> >
> > I have implemented the storage of Java Objects with the
> > JDBCPropertySet.
> > It simply works by serialising the object and storing it in the DATA
> > field.
> > So it works only with the Serializable objects...
> >
> > Here is the code:
> >
> >
> > for the get method:
> >
> > case PropertySet.OBJECT:
> > try {
> > byte[] bs =
> > rs.getBytes(colData);
> > if (bs == null) {
> > o = null;
> > } else {
> > ByteArrayInputStream
> > is = new ByteArrayInputStream(bs);
> > ObjectInputStream
> > ois = new ObjectInputStream(is);
> > o =
> > ois.readObject();
> > }
> > } catch (Exception e) {
> > throw new
> > PropertyImplementationException(e);
> > }
> > break;
> >
> > for the setValues method
> >
> > case PropertySet.OBJECT:
> > try {
> > ByteArrayOutputStream os = new
> > ByteArrayOutputStream();
> > ObjectOutputStream oos = new
> > ObjectOutputStream(os);
> > oos.writeObject(value);
> > oos.close();
> > ps.setBytes(3, os.toByteArray());
> > } catch (Exception e) {
> > throw new
> > PropertyImplementationException(e);
> > }
> > break;
> >
> >
> > What do you think of it? Could the code could go in the CVS repository?
> > Any advices/comment are welcome
> >
> >
> > Joachim.
> >
> >
> >
> > **** DISCLAIMER ****
> > "This e-mail and any attachments thereto may contain information
> > which is confidential and/or protected by intellectual property
> > rights and are intended for the sole use of the recipient(s) named
> > above.
> > Any use of the information contained herein (including, but not
> > limited to,
> > total or partial reproduction, communication or distribution in any
> > form)
> > by persons other than the designated recipient(s) is prohibited.
> > If you have received this e-mail in error, please notify the sender
> > either
> > by telephone or by e-mail and delete the material from any computer.
> > Thank you for your cooperation."
> >
> >
> >
> > -------------------------------------------------------
> > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> > The only event dedicated to issues related to Linux enterprise
> > solutions
> > www.enterpriselinuxforum.com
> >
> > _______________________________________________
> > Opensymphony-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-developers
> >
>
>
>
> -------------------------------------------------------
> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> The only event dedicated to issues related to Linux enterprise solutions
> www.enterpriselinuxforum.com
>
> _______________________________________________
> Opensymphony-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-developers



-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.