[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] descriptor.disableCacheHits() does not disable cache hits

Thanks for the reply

I have modified my name query to include the primary key as follows:-

How to give more then one query hints? (eclipse.refresh and CACHE_USAGE

@Cache (
	    type=CacheType.WEAK,
	    expiry=600000,
	    refreshOnlyIfNewer=true,
	    disableHits=false,
	    coordinationType=CacheCoordinationType.SEND_NEW_OBJECTS_WITH_CHANGES
	    )
@NamedQueries( {
		@NamedQuery(name = "CodFlexCodesB.findAll", 
		            query = "select o from CodFlexCodesB o"),
		@NamedQuery(name  = "CodFlexCodesB.timeValidity", 
				    query = "SELECT em FROM CodFlexCodesB em " +
				    		"WHERE em.id = :pk AND em.codFlexCodeSystemsB.id =  :id AND " +
				    		"(em.startDate <= :endDate OR  :endDate IS NULL ) AND (em.endDate
>= :startDate OR  em.endDate IS NULL) ",
				    hints = @QueryHint(name=QueryHints.CACHE_USAGE,
value=CacheUsage.ConformResultsInUnitOfWork )
				    



Still in log is see the following. what message will I get for the cache
hit. 

EL Fine]: 2008.08.05
16:17:44.296--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--INSERT
INTO COD_FLEX_CODES_TL (LANGUAGE, CREATED_BY, CREATION_DATE, KEY_VALUE,
LAST_UPDATED_BY, LAST_UPDATED_DATE, LAST_UPDATE_LOGIN,
OBJECT_VERSION_NUMBER, SOURCE_LANG, VALUE_CHAR1, VALUE_CHAR2, VALUE_CHAR3,
VALUE_CHAR4, VALUE_CHAR5, VALUE_CHAR6, VALUE_CHAR7, VALUE_CHAR8, ID) VALUES
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [NL, 1217945864250, 2008-08-05 16:17:44.25, GMTEst, 1217945864250,
2008-08-05 16:17:44.25, test, 1, NL, null, null, null, null, null, null,
null, null, 9587]
[EL Fine]: 2008.08.05
16:17:44.296--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--SELECT
t0.ID, t0.CREATED_BY, t0.CREATION_DATE, t0.END_DATE, t0.LAST_UPDATED_BY,
t0.LAST_UPDATED_DATE, t0.LAST_UPDATE_LOGIN, t0.OBJECT_VERSION_NUMBER,
t0.START_DATE, t0.VALUE_DATE1, t0.VALUE_DATE2, t0.VALUE_DATE3,
t0.VALUE_DATE4, t0.VALUE_DATE5, t0.VALUE_DATE6, t0.VALUE_DATE7,
t0.VALUE_DATE8, t0.VALUE_NR1, t0.VALUE_NR2, t0.VALUE_NR3, t0.VALUE_NR4,
t0.VALUE_NR5, t0.VALUE_NR6, t0.VALUE_NR7, t0.VALUE_NR8, t0.FLCO_ID8,
t0.FLCO_ID3, t0.FCSY_ID, t0.STATUS_ID, t0.FLCO_ID1, t0.FLCO_ID7,
t0.FLCO_ID9, t0.FLCO_ID4, t0.FLCO_ID6, t0.FLCO_ID2, t0.FLCO_ID5 FROM
COD_FLEX_CODES_B t0, COD_FLEX_CODE_SYSTEMS_B t1 WHERE (((((t0.ID = ?) AND
(t1.ID = ?)) AND ((t0.START_DATE <= ?) OR (? IS NULL))) AND ((t0.END_DATE >=
?) OR (t0.END_DATE IS NULL))) AND (t1.ID = t0.FCSY_ID))
	bind => [9587, 10001, 2008-08-15 16:17:44.25, 2008-08-15 16:17:44.25,
2008-08-05 16:17:44.25]
[EL Fine]: 2008.08.05
16:17:44.312--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--SELECT
t0.ID, t0.CREATED_BY, t0.CREATION_DATE, t0.END_DATE, t0.LAST_UPDATED_BY,
t0.LAST_UPDATED_DATE, t0.LAST_UPDATE_LOGIN, t0.OBJECT_VERSION_NUMBER,
t0.START_DATE, t0.VALUE_DATE1, t0.VALUE_DATE2, t0.VALUE_DATE3,
t0.VALUE_DATE4, t0.VALUE_DATE5, t0.VALUE_DATE6, t0.VALUE_DATE7,
t0.VALUE_DATE8, t0.VALUE_NR1, t0.VALUE_NR2, t0.VALUE_NR3, t0.VALUE_NR4,
t0.VALUE_NR5, t0.VALUE_NR6, t0.VALUE_NR7, t0.VALUE_NR8, t0.FLCO_ID8,
t0.FLCO_ID3, t0.FCSY_ID, t0.STATUS_ID, t0.FLCO_ID1, t0.FLCO_ID7,
t0.FLCO_ID9, t0.FLCO_ID4, t0.FLCO_ID6, t0.FLCO_ID2, t0.FLCO_ID5 FROM
COD_FLEX_CODES_B t0, COD_FLEX_CODE_SYSTEMS_B t1 WHERE (((((t0.ID = ?) AND
(t1.ID = ?)) AND ((t0.START_DATE <= ?) OR (? IS NULL))) AND ((t0.END_DATE >=
?) OR (t0.END_DATE IS NULL))) AND (t1.ID = t0.FCSY_ID))
	bind => [9587, 10001, 2008-08-26 16:17:44.312, 2008-08-26 16:17:44.312,
2008-08-16 16:17:44.312]
Size 1
>>>>><<<<< false
Size 0
[EL Fine]: 2008.08.05
16:17:44.312--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--SELECT
t0.ID, t0.CREATED_BY, t0.CREATION_DATE, t0.END_DATE, t0.LAST_UPDATED_BY,
t0.LAST_UPDATED_DATE, t0.LAST_UPDATE_LOGIN, t0.OBJECT_VERSION_NUMBER,
t0.START_DATE, t0.VALUE_DATE1, t0.VALUE_DATE2, t0.VALUE_DATE3,
t0.VALUE_DATE4, t0.VALUE_DATE5, t0.VALUE_DATE6, t0.VALUE_DATE7,
t0.VALUE_DATE8, t0.VALUE_NR1, t0.VALUE_NR2, t0.VALUE_NR3, t0.VALUE_NR4,
t0.VALUE_NR5, t0.VALUE_NR6, t0.VALUE_NR7, t0.VALUE_NR8, t0.FLCO_ID8,
t0.FLCO_ID3, t0.FCSY_ID, t0.STATUS_ID, t0.FLCO_ID1, t0.FLCO_ID7,
t0.FLCO_ID9, t0.FLCO_ID4, t0.FLCO_ID6, t0.FLCO_ID2, t0.FLCO_ID5 FROM
COD_FLEX_CODES_B t0, COD_FLEX_CODE_SYSTEMS_B t1 WHERE (((((t0.ID = ?) AND
(t1.ID = ?)) AND ((t0.START_DATE <= ?) OR (? IS NULL))) AND ((t0.END_DATE >=
?) OR (t0.END_DATE IS NULL))) AND (t1.ID = t0.FCSY_ID))
	bind => [9587, 10001, 2008-07-25 16:17:44.312, 2008-07-25 16:17:44.312,
2008-07-26 16:17:44.312]
Size 0
[EL Fine]: 2008.08.05
16:17:44.312--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--DELETE
FROM COD_FLEX_CODES_TL WHERE ((ID = ?) AND (LANGUAGE = ?))
	bind => [9587, NL]
[EL Fine]: 2008.08.05
16:17:44.312--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--DELETE
FROM COD_FLEX_CODES_TL WHERE ((ID = ?) AND (LANGUAGE = ?))
	bind => [9587, US]
[EL Fine]: 2008.08.05
16:17:44.312--ClientSession(17489534)--Connection(9790036)--Thread(Thread[main,5,main])--DELETE
FROM COD_FLEX_CODES_B WHERE (ID = ?)
	bind => [9587]




elygre wrote:
> 
> While working with caching, I have customized a class descriptor, calling
> "descriptor.disableCacheHits();". I figured that this would make multiple
> calls to "em.find(key)" generate multiple SQL-statements to the database.
> 
>  
> 
> This does not happen, and then I wonder why. There is really not much else
> going on, in terms of configuration and setup. Anything I need to switch
> on?
> 
>  
> 
> Eirik
> 
>  
> 
> 
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 

-- 
View this message in context: http://www.nabble.com/descriptor.disableCacheHits%28%29-does-not-disable-cache-hits-tp18826932p18832380.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.