Well, I may tell you what I know on the matter,
but don't be disappointed by my ignorance:

java.sql.Struct is the father of all the DB object
not exactly "primitives", that is BLOB, CLOB, VARRAYs and friends.
There aren't many db servers supporting this sort of stuff
(perhaps just Oracle Server 8i + 9i); Oracle allows you to
shape your data in a Table-inside-a-Table approach, but actually
I've never used it. I remember that in my own youth you
could manage that with PL/SQL code only,
but since then support for jdbc has been extended and I believe
you could mimic PL/SQL code using java classes.
(By the way, PL-SQL is the native db language).

There are few examples around about reading and writing
java.sql.Struct, and all of them come from technet.oracle.com;
the only suggestion that comes to my mind is to put all
the stuff in a transaction:

- getConnection()
- conn.setAutoCommit(false)
- read & write
- conn.commit();
- conn.close();

due to the way the server keeps track of the data & the buffers;
another could be to upgrade the jdbc driver to a more recent version;
finally  there could be some gain in moving your code from java
"outside" the db to java "inside" (ie java store procedures) or
straight to a plsql package
(perhaps you have already done that...)


I'm sorry I can only give general suggestions,
but nevertheless hope it may help

bye , d.rizzi





-----Messaggio originale-----
Da: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
Inviato: marted� 4 giugno 2002 10.44
A: [EMAIL PROTECTED]
Oggetto: Re: R: maybe someone knows. Desesperated



Upppps,

:-)

The issue is really complex and I can not find any documentation or example.
Struct is a connected data structure which belongs to JDBC as, by example,
also, ResultSet does, ARRAY...

I am using VisualAge with WTE and thin Oracle driver. Struct (not Struts),
as a connected object holds a instance of OracleConnection to the database
where it comes from.

We are not handling just simple connections, but pooled connections from the
WTE pool, which are, in turn, instances of OracleProxyConnection. The point
is that when I try to use OracleProxyConnection to create the JDBC callable
statement (calls are made through stored procedures), and registerOutParams,
etc, etc, the update is not succeeded. However when I use to create the
CallableStatement the connection holded inside the Struct component, update
is ok, but this connnection is not pooled. Furthermore, if I close this
connection, next time I surprisingly get a closed connection from the pool.
(??????). It seems that same connnection is reclycled by the pool when it
actually comes from the struct object, worst it is closed!!!

No idea how to proceed. The question is, has any of you updated or inserted
with JDBC an Struct object in a database through a connection obtained from
a pool?

Just forget if you do not understand, it is quite deep, or maybe I am
missing the obvious!

Regards,

Adolfo.


>From: "daniele rizzi" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: R: maybe someone knows. Desesperated
>Date: Tue, 4 Jun 2002 09:16:37 +0200
>
>
>Hi Adolfo,
>what are you aims in inserting a OracleConnection in a table
>using a connection?
>
>daniele rizzi (perplexed)
>
>
>-----Messaggio originale-----
>Da: Adolfo Miguelez [mailto:[EMAIL PROTECTED]]
>Inviato: luned� 3 giugno 2002 19.34
>A: [EMAIL PROTECTED]
>Oggetto: maybe someone knows. Desesperated
>
>
>Has any of you, by chance, inserted an java.sql.Struct (which holds an
>OracleConnection) data into an Oracle DB by using a connection obtained
>from
>a WTE datasource (instance of OracleConnectionProxy)?
>
>Is it possible?
>
>TIA,
>
>Adolfo.
>
>
>
>_________________________________________________________________
>Join the world�s largest e-mail service with MSN Hotmail.
>http://www.hotmail.com
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to