pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
JDBC-Driver with Weblogic 2+ messages / 2 participants [nested] [flat]
* JDBC-Driver with Weblogic @ 2000-11-13 18:40 Nils Hartmann <nils.hartmann@curry.de> 0 siblings, 0 replies; 2+ messages in thread From: Nils Hartmann @ 2000-11-13 18:40 UTC (permalink / raw) To: pgsql-interfaces Hello, maybe this post is off topic, than please ignore it.... We have a very special problem here: we're using Weblogic Application Server (WLS) 5.1 as EJB-Container, and want to use Postgres as database backend. I have a problem with nearly *all* tested JDBC-Drivers from different Vendors (including Oracle and Informix): it seems that they are not able to work with Weblogic when they should write serialized Java-Objects. According to EJB specification one can have on CMP Beans attributes that implement java.io.Serializable. Unfortunatly I don't find a JDBC-Driver that works with that. Now I'm trying Postgres, and I made a little "hack" to the JDBC driver to get it work: WLS calls the "setObject" method on PreperedStatement to write serializable objects to the database. Since the setObject method of PG's JDBC driver tries to "map" an Object to a postgresql table it fails for unkown types. Now I modified this method, that it converts this object to byte[] and calls setBytes. This method seems to work but it is pretty slooooow :(. (Note good news is, that it actualy works, in opposite to Oracle, Informix, ... :-) My question is: do you know some better way to store Serializable objects? Maybe in 7.1? Note: I'have to call the setObject method, since that is called from WLS. Thanks for your comments! nils -- NILS HARTMANN CURRY. SMILE @ WORK. Curry Communication GmbH Behringstr. 28a 22765 Hamburg TEL +49.40.398 344 00 FAX +49.40.398 344 09 ^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: JDBC-Driver with Weblogic @ 2000-11-14 09:19 Peter Mount <petermount@maidstone.gov.uk> 0 siblings, 0 replies; 2+ messages in thread From: Peter Mount @ 2000-11-14 09:19 UTC (permalink / raw) To: 'Nils Hartmann' <nils.hartmann@curry.de>; pgsql-interfaces With our Serialisable implementation, it fails because the tables don't exist. Now there is a create() method that will create those tables, so one alternative is to get it to create the tables on the fly if they don't exist. setBytes() is slow, because you have the overhead of first creating a large object, then writing to it, finally closing it before storing it's oid. Peter -- Peter Mount Enterprise Support Officer, Maidstone Borough Council Email: petermount@maidstone.gov.uk WWW: http://www.maidstone.gov.uk All views expressed within this email are not the views of Maidstone Borough Council -----Original Message----- From: Nils Hartmann [mailto:nils.hartmann@curry.de] Sent: Monday, November 13, 2000 6:41 PM To: pgsql-interfaces@postgresql.org Subject: [INTERFACES] JDBC-Driver with Weblogic Hello, maybe this post is off topic, than please ignore it.... We have a very special problem here: we're using Weblogic Application Server (WLS) 5.1 as EJB-Container, and want to use Postgres as database backend. I have a problem with nearly *all* tested JDBC-Drivers from different Vendors (including Oracle and Informix): it seems that they are not able to work with Weblogic when they should write serialized Java-Objects. According to EJB specification one can have on CMP Beans attributes that implement java.io.Serializable. Unfortunatly I don't find a JDBC-Driver that works with that. Now I'm trying Postgres, and I made a little "hack" to the JDBC driver to get it work: WLS calls the "setObject" method on PreperedStatement to write serializable objects to the database. Since the setObject method of PG's JDBC driver tries to "map" an Object to a postgresql table it fails for unkown types. Now I modified this method, that it converts this object to byte[] and calls setBytes. This method seems to work but it is pretty slooooow :(. (Note good news is, that it actualy works, in opposite to Oracle, Informix, ... :-) My question is: do you know some better way to store Serializable objects? Maybe in 7.1? Note: I'have to call the setObject method, since that is called from WLS. Thanks for your comments! nils -- NILS HARTMANN CURRY. SMILE @ WORK. Curry Communication GmbH Behringstr. 28a 22765 Hamburg TEL +49.40.398 344 00 FAX +49.40.398 344 09 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-11-14 09:19 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-11-13 18:40 JDBC-Driver with Weblogic Nils Hartmann <nils.hartmann@curry.de> 2000-11-14 09:19 RE: JDBC-Driver with Weblogic Peter Mount <petermount@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