Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Unexplained Update Statements affecting Concurrency(There are some unwanted UPDATE statements appearing, even though the end-user is carrying out read-only operations.)
Unexplained Update Statements affecting Concurrency [message #524259] Wed, 31 March 2010 11:03 Go to next message
Arun Tiwari is currently offline Arun TiwariFriend
Messages: 2
Registered: March 2010
Location: India
Junior Member
In our application, we are just carrying out the following operations:
1. Invoke the Application URL.
2. Login using the valid username/password
3. Click on a tab to navigate to read-only page
4. Click on a link to retrieve the concerned data.

All the operations in this navigation are Read-only operations but a large number of entities are updated.

We have observed that,

1. Large number of transactions even though the operations are RO.

2. Unexplained update statements.

The concurrency is seriously hampered because of optimistic locking exception.

I am unable to attach the complete logfile, but here are the excerpts from the logfile:

[EL Finer]: 2010-03-30 15:26:26.953--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client acquired
[EL Finer]: 2010-03-30 15:26:26.953--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX binding to tx mgr, status=STATUS_ACTIVE
[EL Finest]: 2010-03-30 15:26:26.953--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(referenceClass=PersonEntity sql="SELECT ID, PAR_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, NAME, CREATED_BY, OBJECT_VERSION_NUMBER, CREATION_DATE, LCC_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, MIDDLE_NAME, GENDER, MARITAL_STATUS, PARTY_IDENTIFIER, COUNTRY_OF_BIRTH, NAME_SUFFIX, ACADEMIC_YEAR_LEVEL, LAST_NAME, DATE_OF_BIRTH, PREFERRED_NAME, PLACE_OF_BIRTH, DATE_OF_DEATH, TITLE, FIRST_NAME FROM OSL_PARTIES WHERE ((PARTY_IDENTIFIER = ?) AND (PAR_TYPE = ?))")
[EL Finest]: 2010-03-30 15:26:26.953--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Connection(28547909)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, PAR_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, NAME, CREATED_BY, OBJECT_VERSION_NUMBER, CREATION_DATE, LCC_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, MIDDLE_NAME, GENDER, MARITAL_STATUS, PARTY_IDENTIFIER, COUNTRY_OF_BIRTH, NAME_SUFFIX, ACADEMIC_YEAR_LEVEL, LAST_NAME, DATE_OF_BIRTH, PREFERRED_NAME, PLACE_OF_BIRTH, DATE_OF_DEATH, TITLE, FIRST_NAME FROM OSL_PARTIES WHERE ((PARTY_IDENTIFIER = ?) AND (PAR_TYPE = ?))
bind => [11052, PERSON]
[EL Finest]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(name="_rootLIConfig" referenceClass=LIConfigEntity )
[EL Finest]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Connection(768496)--T hread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, PROGRESS_ASSESSMENT_FLAG, FORMAL_ASSESSMENT_FLAG, HOST_CLASS_FLAG, LAST_UPDATED_BY, LAST_UPDATE_DATE, SHOW_FEEDBACK_FLAG, DEMONSTRATION_ASSESSMENT_FLAG, CHILD_WEIGHTINGS_FLAG, CREATED_BY, OBSERVATION_ASSESSMENT_FLAG, COMMENT_ASSESSMENT_FLAG, OBJECT_VERSION_NUMBER, CREATION_DATE, ORDER_SEQUENCE, LCC_ID, COL_ID, LIT_ID, ASSESSMENT_TYPE, ASSESSMENT_NUMERIC_SCALE, ASSESSMENT_ROUNDING, PRS_ID FROM OSL_LEARNING_CONFIGS WHERE (ID = ?)
bind => [1]
[EL Finest]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(name="_learningItem" referenceClass=LearningItemEntity )
[EL Finest]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Connection(14852729)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, LIT_TYPE, SHOW_ENROLMENTS_FLAG, VISIBLE_FLAG, LAST_UPDATED_BY, LAST_UPDATE_DATE, CREATED_BY, SHOW_OUTCOMES_FLAG, OBJECT_VERSION_NUMBER, START_DATE, CREATION_DATE, ORDER_SEQUENCE, END_DATE, TITLE, AUTHOR_PAR_ID, SHOW_STUDENT_OVERVIEW_FLAG, SAME_OVERVIEW_FLAG, SHOW_TEACHER_OVERVIEW_FLAG, STUDENT_OVERVIEW_RID_ID, TEACHER_OVERVIEW_RID_ID, INSTRUCTION_RID_ID, DUE_DATE, ALLOW_ATTACHMENT_FLAG, ALLOW_AUDIO_FLAG, SUBMISSION_TEMPLATE_RID_ID, URL, PROTOCOL FROM OSL_LEARNING_ITEMS WHERE (ID = ?)
bind => [1]
[EL Finest]: 2010-03-30 15:26:26.968--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(name="_creator" referenceClass=PersonEntity )
[EL Finest]: 2010-03-30 15:26:26.984--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Register the existing object oracle.osl.lt.model.parties.PersonEntity@5eef72
[EL Finest]: 2010-03-30 15:26:26.984--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Register the existing object oracle.osl.lt.model.lessonplan.LIConfigEntity@ba35f8
[EL Finest]: 2010-03-30 15:26:26.984--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Register the existing object oracle.osl.lt.model.lessonplan.PersonalRootLIEntity@12d49e0
[EL Finest]: 2010-03-30 15:26:26.984--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Register the existing object oracle.osl.lt.model.parties.PersonEntity@5eef72
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(name="_addressUsages" referenceClass=AddressUsageEntity sql="SELECT ID, OBJECT_VERSION_NUMBER, LAST_UPDATED_BY, LAST_UPDATE_DATE, START_DATE, CREATION_DATE, USAGE_TYPE, END_DATE, CREATED_BY, ADR_ID, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER FROM OSL_PARTY_ADDRESSES WHERE (PAR_ID = ?)")
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Connection(26577567)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, OBJECT_VERSION_NUMBER, LAST_UPDATED_BY, LAST_UPDATE_DATE, START_DATE, CREATION_DATE, USAGE_TYPE, END_DATE, CREATED_BY, ADR_ID, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER FROM OSL_PARTY_ADDRESSES WHERE (PAR_ID = ?)
bind => [11052]
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(name="_phones" referenceClass=PhoneEntity sql="SELECT ID, COP_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, CONTACT_DETAIL, CREATED_BY, PREFERRED_CONTACT_FLAG, OBJECT_VERSION_NUMBER, START_DATE, CREATION_DATE, END_DATE, PRIMARY_PURPOSE_TYPE, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, COUNTRY_PREFIX, PHONE_EXTENSION, PHONE_TYPE, PHONE_NUMBER, AREA_CODE FROM OSL_CONTACT_POINTS WHERE ((PAR_ID = ?) AND (COP_TYPE = ?))")
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Connection(28088202)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, COP_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, CONTACT_DETAIL, CREATED_BY, PREFERRED_CONTACT_FLAG, OBJECT_VERSION_NUMBER, START_DATE, CREATION_DATE, END_DATE, PRIMARY_PURPOSE_TYPE, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, COUNTRY_PREFIX, PHONE_EXTENSION, PHONE_TYPE, PHONE_NUMBER, AREA_CODE FROM OSL_CONTACT_POINTS WHERE ((PAR_ID = ?) AND (COP_TYPE = ?))
bind => [11052, PHONE]
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(name="_emails" referenceClass=EmailEntity sql="SELECT ID, COP_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, CONTACT_DETAIL, CREATED_BY, PREFERRED_CONTACT_FLAG, OBJECT_VERSION_NUMBER, START_DATE, CREATION_DATE, END_DATE, PRIMARY_PURPOSE_TYPE, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, EMAIL_ADDRESS, EMAIL_FORMAT FROM OSL_CONTACT_POINTS WHERE ((PAR_ID = ?) AND (COP_TYPE = ?))")
[EL Finest]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:26.984--ServerSession(13665339)--Connection(1121869)-- Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, COP_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, CONTACT_DETAIL, CREATED_BY, PREFERRED_CONTACT_FLAG, OBJECT_VERSION_NUMBER, START_DATE, CREATION_DATE, END_DATE, PRIMARY_PURPOSE_TYPE, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, EMAIL_ADDRESS, EMAIL_FORMAT FROM OSL_CONTACT_POINTS WHERE ((PAR_ID = ?) AND (COP_TYPE = ?))
bind => [11052, EMAIL]
[EL Finest]: 2010-03-30 15:26:27.031--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(name="_languages" referenceClass=LanguageSpokenEntity sql="SELECT ID, PRIMARY_LANGUAGE_FLAG, OBJECT_VERSION_NUMBER, LAST_UPDATED_BY, LAST_UPDATE_DATE, CREATION_DATE, SPOKEN_COMPREHENSION_LEVEL, NATIVE_LANGUAGE_FLAG, LANGUAGE_CODE, CREATED_BY, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER FROM OSL_PERSON_LANGUAGES WHERE (PAR_ID = ?)")
[EL Finest]: 2010-03-30 15:26:27.031--ServerSession(13665339)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:27.031--ServerSession(13665339)--Connection(4361897)-- Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, PRIMARY_LANGUAGE_FLAG, OBJECT_VERSION_NUMBER, LAST_UPDATED_BY, LAST_UPDATE_DATE, CREATION_DATE, SPOKEN_COMPREHENSION_LEVEL, NATIVE_LANGUAGE_FLAG, LANGUAGE_CODE, CREATED_BY, PAR_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER FROM OSL_PERSON_LANGUAGES WHERE (PAR_ID = ?)
bind => [11052]
[EL Finer]: 2010-03-30 15:26:27.031--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beforeCompletion callback, status=STATUS_ACTIVE
[EL Finer]: 2010-03-30 15:26:27.031--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--begin unit of work commit
[EL Finer]: 2010-03-30 15:26:27.031--ClientSession(15332453)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX beginTransaction, status=STATUS_ACTIVE
[EL Finest]: 2010-03-30 15:26:27.031--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query UpdateObjectQuery(oracle.osl.lt.model.parties.PersonEntity@13f6e85)
[EL Finest]: 2010-03-30 15:26:27.031--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadAllQuery(referenceClass=PersonEntity sql="SELECT ID, PAR_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, NAME, CREATED_BY, OBJECT_VERSION_NUMBER, CREATION_DATE, LCC_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, MIDDLE_NAME, GENDER, MARITAL_STATUS, PARTY_IDENTIFIER, COUNTRY_OF_BIRTH, NAME_SUFFIX, ACADEMIC_YEAR_LEVEL, LAST_NAME, DATE_OF_BIRTH, PREFERRED_NAME, PLACE_OF_BIRTH, DATE_OF_DEATH, TITLE, FIRST_NAME FROM OSL_PARTIES WHERE ((PARTY_IDENTIFIER = ?) AND (PAR_TYPE = ?))")
[EL Finest]: 2010-03-30 15:26:27.031--ClientSession(15332453)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--reconnecting to external connection pool
[EL Fine]: 2010-03-30 15:26:27.031--ClientSession(15332453)--Connection(25084475)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--SELECT ID, PAR_TYPE, LAST_UPDATED_BY, LAST_UPDATE_DATE, NAME, CREATED_BY, OBJECT_VERSION_NUMBER, CREATION_DATE, LCC_ID, EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER, MIDDLE_NAME, GENDER, MARITAL_STATUS, PARTY_IDENTIFIER, COUNTRY_OF_BIRTH, NAME_SUFFIX, ACADEMIC_YEAR_LEVEL, LAST_NAME, DATE_OF_BIRTH, PREFERRED_NAME, PLACE_OF_BIRTH, DATE_OF_DEATH, TITLE, FIRST_NAME FROM OSL_PARTIES WHERE ((PARTY_IDENTIFIER = ?) AND (PAR_TYPE = ?))
bind => [11052, PERSON]
============================================================ ============================================================ ======
FIRST UPDATE STATEMENT - STARTS
============================================================ ============================================================ ======
[EL Fine]: 2010-03-30 15:26:27.031--ClientSession(15332453)--Connection(25084475)- -Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--UPDATE OSL_PARTIES SET EXTERNAL_SYSTEM_IDENTIFIER = ?, EXTERNAL_IDENTIFIER = ?, LAST_UPDATE_DATE = ?, OBJECT_VERSION_NUMBER = ? WHERE ((ID = ?) AND (OBJECT_VERSION_NUMBER = ?))
bind => [null, null, 2010-03-30, 195, 11052, 194]
============================================================ ============================================================ ======
FIRST UPDATE STATEMENT - FINISHES
============================================================ ============================================================ ======

[EL Finer]: 2010-03-30 15:26:27.062--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--TX afterCompletion callback, status=COMMITTED
[EL Finer]: 2010-03-30 15:26:27.078--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--end unit of work commit
[EL Finer]: 2010-03-30 15:26:27.078--UnitOfWork(24745771)--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--release unit of work
[EL Finer]: 2010-03-30 15:26:27.078--ClientSession(15332453)--Thread(Thread[[ACTIVE ] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client released
Re: Unexplained Update Statements affecting Concurrency [message #524630 is a reply to message #524259] Thu, 01 April 2010 15:59 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1039
Registered: July 2009
Senior Member
Hello,

The application seems to be making changes to objects within transactions. How are these operations marked as Read-only? EclipseLink uses minimal updates, so what ever is included in an update statement was changed within the objects - hopefully you can find in the application where it is changing the values mapped to EXTERNAL_SYSTEM_IDENTIFIER, EXTERNAL_IDENTIFIER to null and the LAST_UPDATE_DATE to 2010-03-30 on the object with ID 11052.

Also, how is your application managing the transactions? If it is read only, it seems some methods are wrapped in transactions that shouldn't be.

Best Regards,
Chris
Previous Topic:Stored Procedure call - Autocommit behavior
Next Topic:Set join column to null after removing the related row?
Goto Forum:
  


Current Time: Fri Nov 28 05:59:38 GMT 2014

Powered by FUDForum. Page generated in 0.04950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software