RE: [INTERFACES] query java object?

From: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Joe Shevland'" <shevlandj(at)kpi(dot)com(dot)au>, Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>, "'Phillip Rhodes'" <rhodespc(at)bellatlantic(dot)net>, "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] query java object?
Date: 2000-01-07 09:13:35
Message-ID: 1B3D5E532D18D311861A00600865478C70C05F@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Comments prefixed with PM:

--
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.

-----Original Message-----
From: Joe Shevland [mailto:shevlandj(at)kpi(dot)com(dot)au]
Sent: Friday, January 07, 2000 6:45 PM
To: Peter Mount; 'Phillip Rhodes'; 'pgsql-interfaces(at)postgresql(dot)org'
Subject: Re: [INTERFACES] query java object?

Hi all,

OK, hopefully this all makes sense...

<background>
The enterprise java beans spec specifies that classes
requiring (CMP) persistence need to let the container know
which attributes to persist by way of an XML
descriptor.
</background>

So, given that we only want to persist certain properties/attributes
of a particular Java class is this possible using the mechanism
described below?

Also, what are the overheads involved here? I guess the table
will need to be created the first time an object of a particular
type is stored, after that it should fairly normal?

PM: Our existing model is based around Serializable rather than
Enterprise Java Beans, but yes, it includes a static create() method
which will parse the class (and sub-classes), and creates one or more
tables ready to store the objects. It doesn't create any indices (yet).

I'd love to be able to come up with a container-managed-persistence
module based on PostgreSQL for EJBOSS (www.ejboss.org) but
I'm still sorting things out in my head as to the best ways of doing
this.

PM: I haven't looked at Enterprise Java Beans before (mainly because I
haven't needed to), but I don't see why we can't support them in a
similar manner to Serializable classes.

One little weird one, given that the Java classes you persist actually
persist other classes they reference (as long as they're defined in
PostgreSQL mapping I guess), would a way around the cyclic
reference problem be to check the .equals() method when storing
chained objects, maintain a hashtable for each root node and not
store the object if it has already been done? That seems awfully
simplistic, what are the issues involved?

PM: This is a problem with our Serialize class. I wonder how Sun handle
this with Serialized objects?

Regards,
Joe.

----- Original Message -----
From: "Peter Mount" <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
To: "'Phillip Rhodes'" <rhodespc(at)bellatlantic(dot)net>;
"'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgreSQL(dot)org>
Sent: Thursday, January 06, 2000 1:50 AM
Subject: RE: [INTERFACES] query java object?

> Yes of sorts. We have a small extension that allows a Serialized
object
> to be stored in one or more tables (rather than as a stream). Once
> serialized in this way, you can then query the stored objects just
like
> any other SQL Table.
>
> Peter
>
> --
> Peter Mount
> Enterprise Support
> Maidstone Borough Council
> Any views stated are my own, and not those of Maidstone Borough
Council.
>
>
>
> -----Original Message-----
> From: Phillip Rhodes [mailto:rhodespc(at)bellatlantic(dot)net]
> Sent: Monday, January 03, 2000 2:11 AM
> To: 'pgsql-interfaces(at)postgresql(dot)org'
> Subject: [INTERFACES] query java object?
>
>
> I read through the documentation for Postgres and Java, but I am a
> little
> unclear on something: (probably a few things!)
>
> Is it possible to execute a query based on the attributes of a
> serialized
> object? Or do I have to instantiate each object and do an if test?
>
>
> Thanks!
>
> Phillip
>
>
>
> ************
>
> ************
>

Browse pgsql-interfaces by date

  From Date Subject
Next Message SAKAIDA 2000-01-07 11:15:30 pgbash-2.0.1 released
Previous Message Dr.K.S.Sangunni 2000-01-07 06:12:52 servlet and pgsql