Home » Eclipse Projects » EclipseLink » EclipseLink & Websphere cluster & Oracle 11g2 DCN(DCN received but non invalidation object done even if the object exist in the instance cache)
EclipseLink & Websphere cluster & Oracle 11g2 DCN [message #1150213] |
Tue, 22 October 2013 16:20 |
Marouane Marouane Messages: 6 Registered: October 2013 |
Junior Member |
|
|
Hello,
1. My environnement :
Websphere 8.5 / Cluster with 2 instances.
Oracle 11g 2.0
EclipseLink 2.5.1
JPA 2.1
2. Both instances have in there own shared cache the object User ID=2 / version = 2
Instance 2 : print jpa cache
ServerSession(-522092388)--Thread(Thread[WebContainer : 1,5,main])--
SoftCacheWeakIdentityMap for: User
Key: 2 Version: 2 Identity Hash Code: -1679144484 Object: ma.valueit.model.User@9bea49dc[username=admin,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ]
Instance 1: print jpa cache
ServerSession(-1197992501)--Thread(Thread[WebContainer : 0,5,main])--
SoftCacheWeakIdentityMap for: User
Key: 2 Version: 2 Identity Hash Code: -1679144484 Object: ma.valueit.model.User@9bea49dc[username=admin,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ]
3. When i update object User from one instance 1, i receive DCN notificaion on both instances 1 & 2.
4. But the instance 2 don't invalidate the object User.
5. here is the output log for both instances :
Instance 2 :
[21/10/13 17:40:35:374 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.374--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--begin unit of work flush
[21/10/13 17:40:35:376 WET] 0000010f SystemOut O [EL Finest]: 2013-10-21 17:40:35.376--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--Execute query UpdateObjectQuery(ma.valueit.model.User@50371d12[username=admin,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ])
[21/10/13 17:40:35:377 WET] 0000010f SystemOut O [EL Fine]: 2013-10-21 17:40:35.376--ClientSession(-186895409)--Connection(469452821)--Thread(Thread[WebContainer : 1,5,main])--UPDATE app_user SET first_name = ?, VERSION = ? WHERE ((ID = ?) AND (VERSION = ?))
bind => [Matt 83, 3, 2, 2]
[21/10/13 17:40:35:380 WET] 0000010f SystemOut O [EL Finest]: 2013-10-21 17:40:35.38--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--Execute query ValueReadQuery(name="oracle.dcn.transaction-id" sql="SELECT DBMS_TRANSACTION.LOCAL_TRANSACTION_ID FROM DUAL")
[21/10/13 17:40:35:380 WET] 0000010f SystemOut O [EL Fine]: 2013-10-21 17:40:35.38--ClientSession(-186895409)--Connection(469452821)--Thread(Thread[WebContainer : 1,5,main])--SELECT DBMS_TRANSACTION.LOCAL_TRANSACTION_ID FROM DUAL
[21/10/13 17:40:35:381 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.381--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--end unit of work flush
[21/10/13 17:40:35:382 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.382--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--resume unit of work
[21/10/13 17:40:35:382 WET] 0000010f SystemOut O [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@8ea690f9][AFTER saveUser]...........
[21/10/13 17:40:35:384 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.384--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--begin unit of work commit
[21/10/13 17:40:35:386 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.386--ClientSession(-186895409)--Connection(469452821)--Thread(Thread[WebContainer : 1,5,main])--commit transaction
[21/10/13 17:40:35:397 WET] 00000119 SystemOut O [EL Finest]: 2013-10-21 17:40:35.392--ServerSession(-522092388)--Thread(Thread[Thread-121,5,main])--Receieved database change event [Connection information : local=linuxawb/10.10.1.151:47633, remote=linuxawb/10.10.1.151:14014
Registration ID : 1007
Notification version : 1
Event type : OBJCHANGE
Database name : awb
Table Change Description (length=1)
operation=[UPDATE], tableName=AWB.APP_USER, objectNumber=72807
Row Change Description (length=1):
ROW: operation=UPDATE, ROWID=AAARxnAAEAAAAEvAAB
].
[21/10/13 17:40:35:406 WET] 0000010f SystemOut O [EL Finest]: 2013-10-21 17:40:35.406--ServerSession(-522092388)--Connection(-802177926)--Thread(Thread[WebContainer : 1,5,main])--Connection released to connection pool [default].
[21/10/13 17:40:35:408 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.408--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--end unit of work commit
[21/10/13 17:40:35:408 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.408--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--resume unit of work
[21/10/13 17:40:35:408 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.408--UnitOfWork(-1674718300)--Thread(Thread[WebContainer : 1,5,main])--release unit of work
[21/10/13 17:40:35:408 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.408--ClientSession(-186895409)--Thread(Thread[WebContainer : 1,5,main])--client released
[21/10/13 17:40:35:433 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.433--ServerSession(-522092388)--Thread(Thread[WebContainer : 1,5,main])--client acquired: 915969456
[21/10/13 17:40:35:434 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.434--ClientSession(915969456)--Thread(Thread[WebContainer : 1,5,main])--acquire unit of work: 247662690
[21/10/13 17:40:35:434 WET] 0000010f SystemOut O [EL Finest]: 2013-10-21 17:40:35.434--ServerSession(-522092388)--Connection(1678668990)--Thread(Thread[WebContainer : 1,5,main])--Connection acquired from connection pool [default].
[21/10/13 17:40:35:434 WET] 0000010f SystemOut O [EL Finer]: 2013-10-21 17:40:35.434--ClientSession(915969456)--Connection(1678668990)--Thread(Thread[WebContainer : 1,5,main])--begin transaction
[21/10/13 17:40:35:434 WET] 0000010f SystemOut O [EL Finest]: 2013-10-21 17:40:35.434--ClientSession(915969456)--Thread(Thread[WebContainer : 1,5,main])--reconnecting to external connection pool
[21/10/13 17:40:35:435 WET] 0000010f SystemOut O [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@8ea690f9][BEFOR getAll]...........
[21/10/13 17:40:35:437 WET] 0000010f SystemOut O [EL Severe]: 2013-10-21 17:40:35.436--ServerSession(-522092388)--Thread(Thread[WebContainer : 1,5,main])--
SoftCacheWeakIdentityMap for: User
Key: 2 Version: 3 Identity Hash Code: 58913519 Object: ma.valueit.model.User@382f2ef[username=admin,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ]
1 elements
Instance 1 :
[21/10/13 17:40:35:393 WET] 00000118 SystemOut O [EL Finest]: 2013-10-21 17:40:35.392--ServerSession(-1197992501)--Thread(Thread[Thread-129,5,main])--Receieved database change event [Connection information : local=linuxawb/10.10.1.151:47632, remote=linuxawb/10.10.1.151:29729
Registration ID : 1006
Notification version : 1
Event type : OBJCHANGE
Database name : awb
Table Change Description (length=1)
operation=[UPDATE], tableName=AWB.APP_USER, objectNumber=72807
Row Change Description (length=1):
ROW: operation=UPDATE, ROWID=AAARxnAAEAAAAEvAAB
].
... after that we don't receive any invalidation cache for object User (ID=2) in log.
[21/10/13 17:44:18:826 WET] 0000009e SystemOut O [EL Severe]: 2013-10-21 17:44:18.826--ServerSession(-1197992501)--Thread(Thread[WebContainer : 0,5,main])--
SoftCacheWeakIdentityMap for: User
Key: 2 Version: 2 Identity Hash Code: 1679144484 Object: ma.valueit.model.User@9bea49dc[username=admin,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ]
1 elements
Why there is no invalidation on instance 2 even if the object is in its shared cache jpa. ?
Who is reponsible of doing the invalidation is the Listner DCN responsability or Other jpa classe ?
Any suggestion ?
Thx in advance.
|
|
| | |
Re: EclipseLink & Websphere cluster & Oracle 11g2 DCN [message #1152066 is a reply to message #1151305] |
Wed, 23 October 2013 20:02 |
Marouane Marouane Messages: 6 Registered: October 2013 |
Junior Member |
|
|
I have some news ,
Websphere + Oracle DB turne on Red hat linux.
The listener Oracle don't execute the invalidation cache because in the class descriptor (mapping) i write my table with lowercase or the event change received from oracle the table was in uppercase. The listener couldn't retreive the class descriptor using the name of table received from oracle.
I changed my class descriptor writing table in Uppercase. with this change the listener
advance some new step but still don't invalidate the cache.
doing some logging on the listener , i notice that the listener don't find the cache key from the identities maps cache keys.The listener use the ROWID to find the cache key. In the doc eclipselink they said that the ROWID is used in cache index by default when we configure the Oracle Listener change event !! is that right ???? i m not sure !! looking the logging below :
[23/10/13 19:19:17:006 WET] 000001a9 SystemOut O [EL Finest]: 2013-10-23 19:19:17.006--ServerSession(1381159036)--Thread(Thread[Thread-236,5,main])--
.............. Retreiving classe descriptor RelationalDescriptor(com.model.User --> [DatabaseTable(APP_USER)])
[23/10/13 19:19:17:006 WET] 000001a9 SystemOut O [EL Finest]: 2013-10-23 19:19:17.006--ServerSession(1381159036)--Thread(Thread[Thread-236,5,main])--
.............. Retreiving cache index ROWID : CacheIndex([APP_USER.ROWID])
[23/10/13 19:19:17:006 WET] 000001a9 SystemOut O [EL Finest]: 2013-10-23 19:19:17.006--ServerSession(1381159036)--Thread(Thread[Thread-236,5,main])--
............. Printing maps keys
[23/10/13 19:19:17:006 WET] 000001a9 SystemOut O [EL Severe]: 2013-10-23 19:19:17.006--ServerSession(1381159036)--Thread(Thread[Thread-236,5,main])--
SoftCacheWeakIdentityMap for: User
Key: -1 Version: 2 Identity Hash Code: 337586092 Object: com.model.User@141f27ac[username=user,enabled=false,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ]
1 elements
[23/10/13 19:19:17:006 WET] 000001a9 SystemOut O [EL Finest]: 2013-10-23 19:19:17.006--ServerSession(1381159036)--Thread(Thread[Thread-236,5,main])--
........... Retreive cache key : null
Looking the maps keys , you notice that the key conatain only the user id and no rowid !!! ??? thatis normal ??
Any idea ??
Thx
|
|
| |
Goto Forum:
Current Time: Fri Jan 17 00:41:16 GMT 2025
Powered by FUDForum. Page generated in 0.03343 seconds
|