Home » Developer & Programmer » JDeveloper, Java & XML » Calling java stored procedure from oracle (Oracle 11.1.2.1)
Calling java stored procedure from oracle [message #512439] Mon, 20 June 2011 06:03 Go to next message
vaib
Messages: 24
Registered: June 2011
Location: Pune
Junior Member
Hello:)

I am writing a java stoed procedure in my package.
In the java procedure I want to issue a query to be fired on the user table from which I am calling the java procedure.

Some thing like following:
I am logged in to USER1 and my package is inside USER1.
From this package I am calling the Java Stored Procedure.
In java procedure I want to make a jdbc connection to USER2.
The details of USER2(password, hostname,portno) are stored in a table called 'connection_details' and this table is in the USER1.

My problem is how can I issue the
SELECT details FROM CONNECTION_DETAILS for USER2
so that i can get the details..?

Do i need to first make jdbc connection to USER1 and then execute the above query for which i need similar details of USER1.
How can i obtain the details of USER1 here.

I am thinking if I am already in USER1 then do I need to make the jdbc connection to USER1 and then execute the query?

I have made it complicated I know:(
But please guide me in this...


Thank You,
Vaib.


Re: Calling java stored procedure from oracle [message #512467 is a reply to message #512439] Mon, 20 June 2011 08:05 Go to previous message
Michel Cadot
Messages: 58938
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I am logged in to USER1 and my package is inside USER1.

Do you mean a PL/SQL package inside the USER1 schema?

Quote:
In java procedure I want to make a jdbc connection to USER2.

If the answer to the previous is yes then you cannot do this, you cannot change the connection when you are inside the database engine.

Regards
Michel
Previous Topic: xml parsing fail
Next Topic: JSF Design and Source code automatic crash
Goto Forum:
  


Current Time: Sat Aug 30 01:25:59 CDT 2014

Total time taken to generate the page: 0.08789 seconds