开发者

Error executing IBM DB2 Stored Proceedure in EJB container

I'm getting the error below when i try to execute a stored procedure in a Stateless bean with container managed persistance;

com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-751, SQLSTATE=38003, SQLERRMC=STORED PROCEDURE;FXTR324;FXTR324;COMMIT, DRIVER=4.7.85

The stored proc executes without 开发者_如何学JAVAerrors if i manually create the connection the database, i.e. unmanaged transaction.

Is there anything i need to do for it to execute in the EJB bean?


Try to set transaction attribute to NotSupported for method that calls stored procedure. This way you will make sure that your method is executed without active transaction context (active one will be suspended) thus your stored procedure (which presumably does commit/rollback logic) will be successfully executed.

For more info take a look at this article.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜