users
[Top] [All Lists]

Re: [cinjug-users] oracle.sql.ArrayDescriptor

To: users@xxxxxxxxxx
Subject: Re: [cinjug-users] oracle.sql.ArrayDescriptor
From: santosh kaushik <santoshkaushik@xxxxxxxxx>
Date: Thu, 25 Aug 2005 15:07:48 -0700 (PDT)
Delivered-to: mailing list users@cinjug.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vcHpLbdtslUSPl5vWNipzbUvWhY5azdjl8/vj4IBhZDi4S54/nv3oO3fmBsz94ab6TvHSTWaLs2l3OSUFv1JmMXb1ckEN4BKQ3jCg/DE0V9QDHETIVzaJikTjdRvWLV2a4YAUYOQeEK+l/vUuY3Jd2OmplWyC0N6jAgP26o+ZrA= ;
In-reply-to: <20050825031447.7658.qmail@web32406.mail.mud.yahoo.com>
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Hi Saleem
I tried casting it to OracleConnection but it throws ClassCastException.
I could solve the problem by creating a connection in my code instead of getting one from the datasource and passing it to ArrayDescriptor.
I guess the problem is that the application server gives some implementation to java.sql.Connection and returns it. Because of which it doesnt allow us to type cast it, which oracle.sql.ArrayDescriptor tries to do after receiving a Connection.
 
sqlj is a nice suggestion i will try to explore it more and use it in future.
 
Thanx
Regards,
Santosh
 


Saleem Jeelani <saleemjeelani@xxxxxxxxx> wrote:
Try casting the connection you are getting from the
datasource to the type OracleConnection or inner
connection. There is a down side to this though. You
are probably using some sort of connection pooling and
most of the pools generally do not accomodate for
native oracle extensions. When you do use the
OracleConnections or an inner connection and close it
they are not returned to the pool. So you might want
to optimize your connection pools.

One other things that I have tried and have found
great results are using sqlj for native oracle
connections. The performance benefit is almost twice
as much better in sqlj. In case you are interested to
explore this further you might want to download
jdeveloper and play around with it a little.

Hope that was helpful.

Thanks

Saleem

--- santosh kaushik wrote:

>
> we are using jrun 4.0 application server for
> creating a datasource.
>
> I get a connection from the datasource and pass it
> to ArrayDescriptor.
>
>
>
> ArrayDescriptor arrayDescriptor =
> ArrayDescriptor.createDescriptor("obj_xyz",
> connection);
> ARRAY array = new ARRAY(arrayDescriptor, connection,
> (Object[])param);
>
> obj_xyz is the object name on the oracle side.
> (Object[])param is the array of data which i want to
> pass it to in parameter of stored procedure
>
> somehow oracle.sql.ArrayDescriptor doesnt like the
> connection given by JRun Datasource and throws a
> ClassCastException.
>
> but if i create a connection in my code and pass it
> to ArrayDescriptor it accepts it and runs fine.
>
> I will appreciate any help regarding this.
>
> Thanks
>
> Santosh
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com




__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [cinjug-users] oracle.sql.ArrayDescriptor, santosh kaushik <=