Dear Sir/Madam,
I have followed the document and implemented JCS Cache, when I started my application, every thing looks great as following.
01:42:31,276 INFO [PersistenceManagerImpl] start init SessionFactory
01:42:31,396 INFO [Environment] Hibernate 2.0.3
01:42:31,416 INFO [Environment] hibernate.properties not found
01:42:31,416 INFO [Environment] using CGLIB reflection optimizer
01:42:31,416 INFO [Environment] JVM proxy support: true
01:42:31,416 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
01:42:31,716 INFO [Configuration] Mapping resource: onecxn.hbm.xml
01:42:31,977 INFO [Binder] Mapping class: com.primecreation.cxn.system.bean.Hom
eNetwork -> HOME_NETWORK_PROFILE
01:42:31,977 INFO [Configuration] creating JCS cache region: com.primecreation.
cxn.system.bean.HomeNetwork, usage: read-write
01:42:32,107 INFO [CompositeCacheConfigurator] setting defaults to DC
01:42:32,127 INFO [CompositeCacheConfigurator] setting defaultCompositeCacheAtt
ributes to [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 2000
]
01:42:32,147 INFO [CompositeCacheConfigurator] setting defaultElementAttributes
to [ IS_LATERAL = false, IS_SPOOL = true, IS_REMOTE = false, IS_ETERNAL = false
, MaxLifeSeconds = 240, IdleTime = 1800, CreateTime = 1069177352137, LastAccessT
ime = 1069177352137, getTimeToLiveSeconds() = 239990, createTime = 1069177352137
]
01:42:32,147 WARN [OptionConverter] Could not find value for key jcs.system.groupIdCache.elementattributes
01:42:32,147 WARN [CompositeCacheConfigurator] Could not instantiate eAttr named 'jcs.system.groupIdCache.elementattributes', using defaults.
01:42:32,257 INFO [LRUMemoryCache] initialized LRUMemoryCache for groupIdCache
01:42:32,447 INFO [IndexedDiskCache] Cache file root directory: cache
01:42:32,507 INFO [LRUMemoryCache] initialized LRUMemoryCache for com.primecrea
tion.cxn.system.bean.SecondaryNetwork
01:42:32,507 INFO [IndexedDiskCache] Cache file root directory: cache
01:42:32,507 INFO [LRUMemoryCache] initialized LRUMemoryCache for com.primecrea
tion.cxn.system.bean.HomeNetwork
01:42:32,517 INFO [IndexedDiskCache] Cache file root directory: cache
01:42:32,537 INFO [LRUMemoryCache] initialized LRUMemoryCache for com.primecrea
tion.cxn.system.bean.OneCXNSystem
01:42:32,547 INFO [IndexedDiskCache] Cache file root directory: cache
01:42:32,808 INFO [Binder] Mapping collection: com.primecreation.cxn.system.bea
n.HomeNetwork.secondaryNwks -> ONECXN_ODB
01:42:32,838 INFO [Binder] Mapping class: com.primecreation.cxn.system.bean.Sec
ondaryNetwork -> SECONDARY_NETWORK_PROFILE
01:42:32,838 INFO [Configuration] creating JCS cache region: com.primecreation.
cxn.system.bean.SecondaryNetwork, usage: read-write
01:42:32,838 INFO [Binder] Mapping collection: com.primecreation.cxn.system.bea
n.SecondaryNetwork.homeNwks -> ONECXN_ODB
01:42:32,848 INFO [Binder] Mapping class: com.primecreation.cxn.system.bean.One
CXNSystem -> ONECXN_ODB
01:42:32,848 INFO [Configuration] creating JCS cache region: com.primecreation.
cxn.system.bean.OneCXNSystem, usage: read-write
01:42:33,339 INFO [Binder] Mapping class: com.primecreation.cxn.system.bean.One
CXNUser -> ONECXN_USER
01:42:33,409 INFO [Binder] Mapping class: com.primecreation.cxn.system.bean.Use
rSMsisdn -> USER_SMSISDN
01:42:33,429 INFO [Configuration] Configured SessionFactory: null
01:42:33,439 INFO [Configuration] processing one-to-many association mappings
01:42:33,439 INFO [Configuration] processing foreign key constraints
01:42:33,559 INFO [SessionFactoryImpl] building session factory
01:42:33,589 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.Oracle9Dial
ect
01:42:33,609 INFO [NamingHelper] JNDI InitialContext properties:{}
01:42:33,619 INFO [DatasourceConnectionProvider] Using datasource: java:jdbc/CX
NDS
01:42:33,619 INFO [SessionFactoryImpl] Use outer join fetching: true
01:42:36,423 INFO [SessionFactoryImpl] Use scrollable result sets: true
01:42:36,423 INFO [SessionFactoryImpl] JDBC 2 max batch size: 15
01:42:36,423 INFO [SessionFactoryImpl] Transaction strategy: net.sf.hibernate.t
ransaction.JTATransactionFactory
01:42:36,433 INFO [NamingHelper] JNDI InitialContext properties:{}
01:42:36,433 INFO [JTATransactionFactory] Locating TransactionManager using: ne
t.sf.hibernate.transaction.JBossTransactionManagerLookup
01:42:36,443 INFO [NamingHelper] JNDI InitialContext properties:{}
01:42:36,443 INFO [JTATransactionFactory] TransactionManager lookup successful
01:42:36,443 INFO [SessionFactoryImpl] echoing all SQL to stdout
01:42:36,984 INFO [SessionFactoryObjectFactory] no JDNI name configured
01:42:36,984 INFO [SessionFactoryImpl] Query language substitutions: {}
01:42:36,984 INFO [PersistenceManagerImpl] sessionFactory return net.sf.hiberna
te.impl.SessionFactoryImpl@190c99
01:42:37,094 INFO [PersistenceManagerImpl] getTransactionSession return net.sf.
hibernate.impl.SessionImpl@87cd5c
01:42:37,414 INFO [STDOUT] Hibernate: select homenetw0_.HOME_NETWORKID as HOME_
NETWORKID, homenetw0_.HOME_NETWORK_NAME as HOME_NET2_, homenetw0_.MAP_VERSION as
MAP_VERS3_ from HOME_NETWORK_PROFILE homenetw0_
01:42:37,885 INFO [STDOUT] Hibernate: select onecxn_o0_.SEC_NETWORKID as SEC_NE
TW2___, secondar1_.SEC_NETWORKID as SEC_NETWORKID0_, secondar1_.SEC_NETWORK_NAME
as SEC_NETW2_0_ from ONECXN_ODB onecxn_o0_ left outer join SECONDARY_NETWORK_PR
OFILE secondar1_ on onecxn_o0_.SEC_NETWORKID=secondar1_.SEC_NETWORKID where onec
xn_o0_.HOME_NETWORKID=?
As long as I have turn on the "show_sql" print out, when I query the same select statement again, it still print out the same SQL command, does it means that Hibernate do not return the Object from JCS Cache. If yes, what next I need to do. Or print out the SQL is normal even is looked up from cache, please advise.
Thanks for your help in advance.
|