Can I call a Java Stored Procedure from a business method of an EJB?
Yes you can certainly call.
If yes, is it mandatory to use a Bean Managed Bean for the same so as to use the Callable Statement?
You could use CMP as well. I would like to what are you doing in the stored procedure. Are you managing the persistent field retrieval/update etc. In such a case BMP should be used. CMP is meant to free the developer from handling SQL select/update/insert.
No errors displayed while executing the code but displays just "1".
Joined: Feb 13, 2004
To add to my problems, I am now getting the following error.
ERROR! Adding Employee: the Permission (java.net.SocketPermission bom019 resolve) has not been granted to SEETESH. The PL/SQL to grant this is dbms_java.grant_permission( 'SEETESH', 'SYS:java.net.SocketPermission', 'bom019', 'resolve' )
I have the code with me. All I want to know is how did u compiled, run the loadjava and executed the Java Stored Proc.
Did u try to connect to Oracle database server (placed remotely) with oracle client installed on ur comp or did u create and run the loadjava command along with other required commands directly on you comp having the Oracle Database server being installed.
Hi mates, Why are u making things difficult for yourself ? Why dont u just use a simple callable statement and call an oracle procedure and then try to call that java procedure from the oracle procedure. It is hardly an overhead. What do u think Pradeep and Seetesh ? I would prefer u do all these things in a stateless session bean which wud be called by code in ur jsp. [ November 19, 2004: Message edited by: Deepak Acharya ]