Why I receive a 'ORA-02089: COMMIT is not allowed in a subordinate session'
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, November 8, 2005 09:42 AM

Hello,

I'm working with java in eclipse, with a SUN UNIX server with weblogic app server.

I have a EJB (stateless) with transaction type 'Remote' that call a method that use an Oracle database procedure. If I call directly to this method without using the EJB it works perfectly.

The procedure doesn´t contain COMMIT command.

The line of the procedure where it fail is:

senteceStmt := 'DROP SEQUENCE '||USER||'.'||SEQUENCE;
EXECUTE IMMEDIATE senteceStmt;

Thank you very much.
Regards

Re: Why I receive a 'ORA-02089: COMMIT is not allowed in a subordinate session'

Posted By:   ankush_purwar  
Posted On:   Wednesday, November 9, 2005 07:49 AM

you are using a DDL command 'DROP SEQUENCE ' in your procedure. And the same procedure you are calling by EJB that initiates the transaction.

And DDL Command are auto committed, that's why jdbc driver is throwing exception to you.
About | Sitemap | Contact