Skip to Content
author's profile photo Former Member
Former Member

Data base locking in webdynpro

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2007 at 11:12 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.