Topic
No replies
SystemAdmin
SystemAdmin
9224 Posts
ACCEPTED ANSWER

Pinned topic ZRM locks DB when it catches SQL Errors

‏2011-02-28T02:55:07Z |
NOTE: this thread was migrated from projectzero.org. Some content and formatting may have been lost in the move.


Originally posted by projectzero userid: Ryuji - f=4&t=2278#p9310
Hi,

I am getting a problem not to handle sql error via zrm.delegate().

My purpose
To handle sql error returned by DB2 and Get same error message when user performs same action.

Problems
zrm.delegate() locks DB resource when it catches and returns sql error.

Phenomenon
1. Request to insert a new record.
-> it is success.

2. Request to insert the record same as 1.
-> it response error which include sql error generated on db2. ( see details in below.)



{
"errorStatusCode":500,
"rootCause":
"com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=2;DB2ADMIN.BUSINESS_CAT_LARGE, DRIVER=3.50.152",
"errorMessage":
"Error"
}


3. Request again to insert the record same as 1.
-> it doesn't response and keep waiting the end of the insert operation. The previous insert operation is not finished completely, ( it means the database is locked by previous operation 2)

My questions
==> Is it available to set another primary key constraints on table via zero resource models and how to achieve it?
==> Is there any necessary process on zrm when it catches sql error from DB?