cancel
Showing results for 
Search instead for 
Did you mean: 

Data base locking in webdynpro

Former Member
0 Kudos

Hi All,

I want to control DB table transaction through Webdynpro using Enqueue server.. I did the following steps:

Step 1: Set Default Connection Isolation level to Default in Visual Administrator (JDNI Creation).

Step 2: In Dynpro application try to lock and unlock using the following code:

Context initialcontext=new InitialContext();

TableLocking locking (TableLocking) initialcontext.lookup(TableLocking.JNDI_NAME);

loc.lock(TableLocking.LIFETIME_TRANSACTION,conn,tablename,pkMap,TableLocking.MODE_EXCLUSIVE_NONCUMULATIVE);

Unlock:

locking.unlock(TableLocking.LIFETIME_TRANSACTION,conn,tablename,pkMap,TableLocking.MODE_EXCLUSIVE_NONCUMULATIVE);

After this I deployed into server. When try to lock it doesn’t give any error and locked. But at the same time I try to update it’s allowed. It doesn’t give any error like(this record is locked). Is there any steps missed by me?. Otherwise shall I use DB transaction directly through java?.

Kind Regards,

S.Saravanan.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Saravanan,

While using the Table Locking API hoe do i get TableLocking.JNDI_NAME?

I have added applocking service in my used DC, but while running the Session bean,I am getting runtime exception.

The application is trying to find the lookup but its not able to find.

Do i need to add more jars or library??

Thanks in Advance.

Shruti.