Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Caching (again)

På mandag 23. september 2013 kl. 16:32:16, skrev Tom Ware <tom.ware@xxxxxxxxxx>:
Hi Andreas,

  I am not sure I understand exactly what is happening in your case.  Please provide some more details.

  As for the logging, there is no specific cache retrieval log message, but you can infer cache retreival from a combination.  Here is an example where we get an object from the cache:

[EL Finest]: query: 2013-09-23 10:28:29.246--UnitOfWork(10270267)--Thread(Thread[main,5,main])--Execute query ReadObjectQuery(name="readObject" referenceClass=Technology sql="SELECT ID FROM TECHNOLOGY WHERE (ID = ?)")
[EL Finest]: transaction: 2013-09-23 10:28:29.246--UnitOfWork(10270267)--Thread(Thread[main,5,main])--Register the existing object foo.Technology@16077c2

  Note, we log "execute query", but not actual execution on the Connection.

  Here is the same query run without the cache hit:

[EL Finest]: query: 2013-09-23 10:30:48.645--UnitOfWork(20356474)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="indexes" referenceClass=Index )
[EL Finest]: connection: 2013-09-23 10:30:48.646--ServerSession(18543353)--Connection(5232795)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[EL Fine]: sql: 2013-09-23 10:30:48.646--ServerSession(18543353)--Connection(5232795)--Thread(Thread[main,5,main])--SELECT ID, TECHNOLOGY_ID FROM INDEX1 WHERE (TECHNOLOGY_ID = ?)
    bind => [2]
[EL Finest]: connection: 2013-09-23 10:30:48.662--ServerSession(18543353)--Connection(5232795)--Thread(Thread[main,5,main])--Connection released to connection pool [default].

  Note the logging on the connection.
 
Thanks!
 
I'l provide an example showing what I suspect is wrong behavior.
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 

Back to the top