pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedquery java object?
6+ messages / 4 participants
[nested] [flat]
* query java object?
@ 2000-01-03 02:11 Phillip Rhodes <rhodespc@bellatlantic.net>
0 siblings, 0 replies; 6+ messages in thread
From: Phillip Rhodes @ 2000-01-03 02:11 UTC (permalink / raw)
To: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [INTERFACES] query java object?
@ 2000-01-06 09:50 Peter Mount <petermount@it.maidstone.gov.uk>
2000-01-07 18:45 ` Re: [INTERFACES] query java object? Joe Shevland <shevlandj@kpi.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Mount @ 2000-01-06 09:50 UTC (permalink / raw)
To: 'Phillip Rhodes' <rhodespc@bellatlantic.net>; pgsql-interfaces
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@bellatlantic.net]
Sent: Monday, January 03, 2000 2:11 AM
To: 'pgsql-interfaces@postgresql.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
************
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] query java object?
2000-01-06 09:50 RE: [INTERFACES] query java object? Peter Mount <petermount@it.maidstone.gov.uk>
@ 2000-01-07 18:45 ` Joe Shevland <shevlandj@kpi.com.au>
2000-01-07 00:28 ` Re: [INTERFACES] query java object? Assaf Arkin <arkin@exoffice.com>
0 siblings, 1 reply; 6+ messages in thread
From: Joe Shevland @ 2000-01-07 18:45 UTC (permalink / raw)
To: Peter Mount <petermount@it.maidstone.gov.uk>; 'Phillip Rhodes' <rhodespc@bellatlantic.net>; pgsql-interfaces
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?
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.
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?
Regards,
Joe.
----- Original Message -----
From: "Peter Mount" <petermount@it.maidstone.gov.uk>
To: "'Phillip Rhodes'" <rhodespc@bellatlantic.net>;
"'pgsql-interfaces@postgresql.org'" <pgsql-interfaces@postgreSQL.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@bellatlantic.net]
> Sent: Monday, January 03, 2000 2:11 AM
> To: 'pgsql-interfaces@postgresql.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
>
>
>
> ************
>
> ************
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] query java object?
2000-01-06 09:50 RE: [INTERFACES] query java object? Peter Mount <petermount@it.maidstone.gov.uk>
2000-01-07 18:45 ` Re: [INTERFACES] query java object? Joe Shevland <shevlandj@kpi.com.au>
@ 2000-01-07 00:28 ` Assaf Arkin <arkin@exoffice.com>
2000-01-07 19:23 ` Re: [INTERFACES] query java object? Joe Shevland <shevlandj@kpi.com.au>
0 siblings, 1 reply; 6+ messages in thread
From: Assaf Arkin @ 2000-01-07 00:28 UTC (permalink / raw)
To: Joe Shevland <shevlandj@kpi.com.au>; +Cc: Peter Mount <petermount@it.maidstone.gov.uk>; 'Phillip Rhodes' <rhodespc@bellatlantic.net>; pgsql-interfaces
Joe,
Tomorrow we're going to release a new version of Castor that does just
that. It's being developed and tests with PostgreSQL (what else) so you
can bet it's PostgreSQL complaint.
It does Java persistence into SQL tables by mapping Java fields to SQL
columns, supports one-one and many-one relationships, inheritance,
locking, the whole enchilada.
This release only includes the ODMG API, the next release (two weeks
from now) will include the CMP API as well (EJB 1.1 compliant) plus OQL
for describing finders.
The next release will also integrate with Tyrex for JTA transaction
management, 2 phase commit, etc. I've been in contact with Peter about
adding X/A support to the next release of the PostgreSQL JDBC driver to
support distributed transactions.
I'm doing the final touches on the source code right now and will have a
release to download tomorrow.
Oh, the link: http://castor.exolab.org
arkin
Joe Shevland wrote:
>
> 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?
>
> 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.
>
> 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?
>
> Regards,
> Joe.
>
> ----- Original Message -----
> From: "Peter Mount" <petermount@it.maidstone.gov.uk>
> To: "'Phillip Rhodes'" <rhodespc@bellatlantic.net>;
> "'pgsql-interfaces@postgresql.org'" <pgsql-interfaces@postgreSQL.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@bellatlantic.net]
> > Sent: Monday, January 03, 2000 2:11 AM
> > To: 'pgsql-interfaces@postgresql.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
> >
> >
> >
> > ************
> >
> > ************
> >
>
> ************
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [INTERFACES] query java object?
2000-01-06 09:50 RE: [INTERFACES] query java object? Peter Mount <petermount@it.maidstone.gov.uk>
2000-01-07 18:45 ` Re: [INTERFACES] query java object? Joe Shevland <shevlandj@kpi.com.au>
2000-01-07 00:28 ` Re: [INTERFACES] query java object? Assaf Arkin <arkin@exoffice.com>
@ 2000-01-07 19:23 ` Joe Shevland <shevlandj@kpi.com.au>
0 siblings, 0 replies; 6+ messages in thread
From: Joe Shevland @ 2000-01-07 19:23 UTC (permalink / raw)
To: Assaf Arkin <arkin@exoffice.com>; +Cc: Peter Mount <petermount@it.maidstone.gov.uk>; 'Phillip Rhodes' <rhodespc@bellatlantic.net>; pgsql-interfaces
Gotcha reply on the ejb list...
Cheers, very excited to look at this,
Joe Shevland.
----- Original Message -----
From: "Assaf Arkin" <arkin@exoffice.com>
To: "Joe Shevland" <shevlandj@kpi.com.au>
Cc: "Peter Mount" <petermount@it.maidstone.gov.uk>; "'Phillip Rhodes'"
<rhodespc@bellatlantic.net>; "'pgsql-interfaces@postgresql.org'"
<pgsql-interfaces@postgreSQL.org>
Sent: Thursday, January 06, 2000 4:28 PM
Subject: Re: [INTERFACES] query java object?
> Joe,
>
> Tomorrow we're going to release a new version of Castor that does just
> that. It's being developed and tests with PostgreSQL (what else) so you
> can bet it's PostgreSQL complaint.
>
> It does Java persistence into SQL tables by mapping Java fields to SQL
> columns, supports one-one and many-one relationships, inheritance,
> locking, the whole enchilada.
>
> This release only includes the ODMG API, the next release (two weeks
> from now) will include the CMP API as well (EJB 1.1 compliant) plus OQL
> for describing finders.
>
> The next release will also integrate with Tyrex for JTA transaction
> management, 2 phase commit, etc. I've been in contact with Peter about
> adding X/A support to the next release of the PostgreSQL JDBC driver to
> support distributed transactions.
>
> I'm doing the final touches on the source code right now and will have a
> release to download tomorrow.
>
> Oh, the link: http://castor.exolab.org
>
> arkin
>
>
> Joe Shevland wrote:
> >
> > 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?
> >
> > 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.
> >
> > 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?
> >
> > Regards,
> > Joe.
> >
> > ----- Original Message -----
> > From: "Peter Mount" <petermount@it.maidstone.gov.uk>
> > To: "'Phillip Rhodes'" <rhodespc@bellatlantic.net>;
> > "'pgsql-interfaces@postgresql.org'" <pgsql-interfaces@postgreSQL.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@bellatlantic.net]
> > > Sent: Monday, January 03, 2000 2:11 AM
> > > To: 'pgsql-interfaces@postgresql.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
> > >
> > >
> > >
> > > ************
> > >
> > > ************
> > >
> >
> > ************
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* RE: [INTERFACES] query java object?
@ 2000-01-07 09:13 Peter Mount <petermount@it.maidstone.gov.uk>
0 siblings, 0 replies; 6+ messages in thread
From: Peter Mount @ 2000-01-07 09:13 UTC (permalink / raw)
To: 'Joe Shevland' <shevlandj@kpi.com.au>; Peter Mount <petermount@it.maidstone.gov.uk>; 'Phillip Rhodes' <rhodespc@bellatlantic.net>; 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@kpi.com.au]
Sent: Friday, January 07, 2000 6:45 PM
To: Peter Mount; 'Phillip Rhodes'; 'pgsql-interfaces@postgresql.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@it.maidstone.gov.uk>
To: "'Phillip Rhodes'" <rhodespc@bellatlantic.net>;
"'pgsql-interfaces@postgresql.org'" <pgsql-interfaces@postgreSQL.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@bellatlantic.net]
> Sent: Monday, January 03, 2000 2:11 AM
> To: 'pgsql-interfaces@postgresql.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
>
>
>
> ************
>
> ************
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2000-01-07 19:23 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-03 02:11 query java object? Phillip Rhodes <rhodespc@bellatlantic.net>
2000-01-06 09:50 RE: [INTERFACES] query java object? Peter Mount <petermount@it.maidstone.gov.uk>
2000-01-07 18:45 ` Joe Shevland <shevlandj@kpi.com.au>
2000-01-07 00:28 ` Assaf Arkin <arkin@exoffice.com>
2000-01-07 19:23 ` Joe Shevland <shevlandj@kpi.com.au>
2000-01-07 09:13 RE: [INTERFACES] query java object? Peter Mount <petermount@it.maidstone.gov.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox