Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle -> Java -> Oracle without creating new connection

Re: Oracle -> Java -> Oracle without creating new connection

From: Martin T. <bilbothebagginsbab5_at_freenet.de>
Date: 19 Oct 2006 08:06:10 -0700
Message-ID: <1161270370.804420.59670@m73g2000cwd.googlegroups.com>


Manolis Fanourgakis wrote:
> Hi there!
>
> I am using an Oracle stored procedure to call a java class. I want this
> class to access the Oracle database that called it. I use the following
> line of code to get the connection:
>
> Connection cn = DriverManager.getConnection("jdbc:default:connection")
>
> Now, this works, but (I suppose) this creates a new connection. Can I
> get, somehow, the original connection that called the java class? This
> could be a lot quicker? Possibly not consuming connections from the
> connection pool?
>
> Thanks in advance for any help.

Ok, that isn't really what you asked for but: Wouldn't it make more sense to get the data in the PL/SQL proc and then pass it to the java class?
I would only use Java stuff for things I can't do with PL/SQL and querying data isn't exactly among them :-) OC you might have some special requirements here, maybe you like to elaborate on them ...

cheers,
Martin Received on Thu Oct 19 2006 - 10:06:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US