RE: Time To Live Configuration for Invididual Cache Item
Thanks!! It works. Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: 'Turbine JCS Users List' [EMAIL PROTECTED] cc: Subject:RE: Time To Live Configuration for Invididual Cache Item You are creating a new ElementAtrributes object, which probably defaults to isEternal=true. If that is the case, it may never expire. Try getting the default for the region and then modifying it. Something like this should work: JCS cache = getCacheForRegion(regionName); ElementAttributes attr = cache.getElementAttributes().copy(); attr.setMaxLifeSeconds(10); cache.put(name, obj, attr); Aaron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Time To Live Configuration for Invididual Cache Item I'm setting time to live value for an individual cache item, but it doesn't work and it takes TTL value set for that Cache Region in which cache item is added. So, in this scenraio, cache item expires after 100 secs whereas I set to expire after 10 secs. Here is code snippet which is putting cache item: . JCS cache = getCacheForRegion(regionName); ElementAttributes attr = new ElementAttributes(); attr.setMaxLifeSeconds(10); cache.put(name, obj, attr); and here is cache.ccf settings: # DEFAULT CACHE REGION # sets the default aux value for any non configured caches jcs.default= jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttribut es jcs.default.cacheattributes.MaxObjects=100 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory .l ru.LRUMemoryCache jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes jcs.default.elementattributes.IsEternal=false jcs.default.elementattributes.MaxLifeSeconds=1000 jcs.default.elementattributes.IdleTime=1 jcs.default.elementattributes.IsSpool=false jcs.default.elementattributes.IsRemote=false jcs.default.elementattributes.IsLateral=false # LRU Memory Cache jcs.region.eplatform_primary_memory_cache= jcs.region.eplatform_primary_memory_cache.cacheattributes=org.apache.jcs .e ngine.CompositeCacheAttributes jcs.region.eplatform_primary_memory_cache.cacheattributes.MaxObjects=100 00 0 jcs.region.eplatform_primary_memory_cache.cacheattributes.MemoryCacheNam e= org.apache.jcs.engine.memory.lru.LRUMemoryCache jcs.region.eplatform_primary_memory_cache.elementattributes=org.apache.j cs .engine.ElementAttributes jcs.region.eplatform_primary_memory_cache.elementattributes.IsEternal=fa ls e jcs.region.eplatform_primary_memory_cache.elementattributes.MaxLifeSecon ds =1000 jcs.region.eplatform_primary_memory_cache.elementattributes.IdleTime=1 jcs.region.eplatform_primary_memory_cache.elementattributes.IsSpool=fals e jcs.region.eplatform_primary_memory_cache.elementattributes.IsRemote=fal se jcs.region.eplatform_primary_memory_cache.elementattributes.IsLateral=fa ls e ** *** Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA. Thank you. ** *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA. Thank you. *
Indexed Disk Cache Configuration
I gotta use indexed disk caching and below is cache.ccf settings. When I restart my server, it gives following exception: [INFO] CompositeCache - -Constructed cache with name: eplatform_disk_cache [INFO] IndexedDiskCache - -Cache file root directory: c:\tmp [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 0 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 1 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 2 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 3 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 4 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 5 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 6 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 7 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 8 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 9 [ERROR] IndexedDisk - -java.lang.IllegalStateException: Failed to delete eplatform_disk_cache.data [ERROR] IndexedDiskCache - -Failure initializing for fileName: eplatform_disk_cache and root directory: c:\tmp java.lan g.IllegalStateException: Failed to delete eplatform_disk_cache.datajava.lang.IllegalStateException: Failed to delete ep latform_disk_cache.data at org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.reset(IndexedDisk.java:316) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.init(IndexedDiskCache.java:155) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheManager.getCache(IndexedDiskCacheManager.java:174) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCache(IndexedDiskCacheFactory.java:88) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary(CompositeCacheConfigurator.java:451) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:297) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(CompositeCacheConfigurator.java:234) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(CompositeCacheConfigurator.java:222) at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(CompositeCacheConfigurator.java:148) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:244) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:227) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeCacheManager.java:185) at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(CompositeCacheManager.java:130) at org.apache.jcs.JCS.ensureCacheManager(JCS.java:135) at org.apache.jcs.JCS.getInstance(JCS.java:101) at com.axa.eplatform.util.ecache.jcache.JCache.getCacheForRegion(JCache.java:44) at com.axa.eplatform.util.ecache.jcache.JCache.get(JCache.java:76) at jsp_servlet._util.__cache._jspService(__cache.java:92) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) cache.ccf # Disk Cache jcs.region.eplatform_disk_cache=DC jcs.region.eplatform_disk_cache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes # object will not be held in memory, straight to disk jcs.region.eplatform_disk_cache.cacheattributes.MaxObjects=0 #jcs.region.eplatform_disk_cache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache #jcs.region.eplatform_disk_cache.cacheattributes.UseMemoryShrinker=true #jcs.region.eplatform_disk_cache.cacheattributes.MaxMemoryIdleTimeSeconds=30 #jcs.region.eplatform_disk_cache.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.eplatform_disk_cache.elementattributes=org.apache.jcs.engine.ElementAttributes jcs.region.eplatform_disk_cache.elementattributes.IsEternal=true #jcs.region.eplatform_disk_cache.elementattributes.MaxLifeSeconds=5 jcs.region.eplatform_disk_cache.elementattributes.IdleTime=1 jcs.region.eplatform_disk_cache.elementattributes.IsSpool=true jcs.region.eplatform_disk_cache.elementattributes.IsRemote=false jcs.region.eplatform_disk_cache.elementattributes.IsLateral=false # Primary Disk Cache -- faster than the rest because of memory key storage jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=c:\\tmp * Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in
Re: Indexed Disk Cache Configuration
I get this message when another jvm process has a reference to my indexed cache files. - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:30 PM Subject: Indexed Disk Cache Configuration I gotta use indexed disk caching and below is cache.ccf settings. When I restart my server, it gives following exception: [INFO] CompositeCache - -Constructed cache with name: eplatform_disk_cache [INFO] IndexedDiskCache - -Cache file root directory: c:\tmp [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 0 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 1 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 2 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 3 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 4 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 5 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 6 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 7 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 8 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 9 [ERROR] IndexedDisk - -java.lang.IllegalStateException: Failed to delete eplatform_disk_cache.data [ERROR] IndexedDiskCache - -Failure initializing for fileName: eplatform_disk_cache and root directory: c:\tmp java.lan g.IllegalStateException: Failed to delete eplatform_disk_cache.datajava.lang.IllegalStateException: Failed to delete ep latform_disk_cache.data at org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.reset(IndexedDisk.java :316) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.init(IndexedDis kCache.java:155) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheManager.getCache(I ndexedDiskCacheManager.java:174) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCach e(IndexedDiskCacheFactory.java:88) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary( CompositeCacheConfigurator.java:451) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:297) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:234) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Co mpositeCacheConfigurator.java:222) at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Com positeCacheConfigurator.java:148) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:244) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:227) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:185) at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(Composit eCacheManager.java:130) at org.apache.jcs.JCS.ensureCacheManager(JCS.java:135) at org.apache.jcs.JCS.getInstance(JCS.java:101) at com.axa.eplatform.util.ecache.jcache.JCache.getCacheForRegion(JCache.jav a:44) at com.axa.eplatform.util.ecache.jcache.JCache.get(JCache.java:76) at jsp_servlet._util.__cache._jspService(__cache.java:92) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java:1058) cache.ccf # Disk Cache jcs.region.eplatform_disk_cache=DC jcs.region.eplatform_disk_cache.cacheattributes=org.apache.jcs.engine.Co mpositeCacheAttributes # object will not be held in memory, straight to disk jcs.region.eplatform_disk_cache.cacheattributes.MaxObjects=0 #jcs.region.eplatform_disk_cache.cacheattributes.MemoryCacheName=org.apa che.jcs.engine.memory.lru.LRUMemoryCache #jcs.region.eplatform_disk_cache.cacheattributes.UseMemoryShrinker=true #jcs.region.eplatform_disk_cache.cacheattributes.MaxMemoryIdleTimeSecond s=30 #jcs.region.eplatform_disk_cache.cacheattributes.ShrinkerIntervalSeconds =60 jcs.region.eplatform_disk_cache.elementattributes=org.apache.jcs.engine. ElementAttributes jcs.region.eplatform_disk_cache.elementattributes.IsEternal=true #jcs.region.eplatform_disk_cache.elementattributes.MaxLifeSeconds=5 jcs.region.eplatform_disk_cache.elementattributes.IdleTime=1 jcs.region.eplatform_disk_cache.elementattributes.IsSpool=true jcs.region.eplatform_disk_cache.elementattributes.IsRemote=false jcs.region.eplatform_disk_cache.elementattributes.IsLateral=false # Primary Disk Cache -- faster than the rest because of memory key storage jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheF actory jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.Indexe dDiskCacheAttributes
Re: Indexed Disk Cache Configuration
Is there anything needs to be done in code for disk specific JCS instance like releasing file handle or something? There are two files which got created automatically, one having extension .data and other .key, but why .key extension file always has 0KB size whereas .data one expands as I put more cache items Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] cc: Subject:Re: Indexed Disk Cache Configuration I get this message when another jvm process has a reference to my indexed cache files. - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:30 PM Subject: Indexed Disk Cache Configuration I gotta use indexed disk caching and below is cache.ccf settings. When I restart my server, it gives following exception: [INFO] CompositeCache - -Constructed cache with name: eplatform_disk_cache [INFO] IndexedDiskCache - -Cache file root directory: c:\tmp [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 0 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 1 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 2 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 3 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 4 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 5 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 6 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 7 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 8 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 9 [ERROR] IndexedDisk - -java.lang.IllegalStateException: Failed to delete eplatform_disk_cache.data [ERROR] IndexedDiskCache - -Failure initializing for fileName: eplatform_disk_cache and root directory: c:\tmp java.lan g.IllegalStateException: Failed to delete eplatform_disk_cache.datajava.lang.IllegalStateException: Failed to delete ep latform_disk_cache.data at org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.reset(IndexedDisk.java :316) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.init(IndexedDis kCache.java:155) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheManager.getCache(I ndexedDiskCacheManager.java:174) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCach e(IndexedDiskCacheFactory.java:88) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary( CompositeCacheConfigurator.java:451) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:297) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:234) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Co mpositeCacheConfigurator.java:222) at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Com positeCacheConfigurator.java:148) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:244) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:227) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:185) at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(Composit eCacheManager.java:130) at org.apache.jcs.JCS.ensureCacheManager(JCS.java:135) at org.apache.jcs.JCS.getInstance(JCS.java:101) at com.axa.eplatform.util.ecache.jcache.JCache.getCacheForRegion(JCache.jav a:44) at com.axa.eplatform.util.ecache.jcache.JCache.get(JCache.java:76) at jsp_servlet._util.__cache._jspService(__cache.java:92) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java:1058) cache.ccf # Disk Cache jcs.region.eplatform_disk_cache=DC jcs.region.eplatform_disk_cache.cacheattributes=org.apache.jcs.engine.Co mpositeCacheAttributes # object will not be held in memory, straight to disk jcs.region.eplatform_disk_cache.cacheattributes.MaxObjects=0 #jcs.region.eplatform_disk_cache.cacheattributes.MemoryCacheName=org.apa che.jcs.engine.memory.lru.LRUMemoryCache #jcs.region.eplatform_disk_cache.cacheattributes.UseMemoryShrinker=true #jcs.region.eplatform_disk_cache.cacheattributes.MaxMemoryIdleTimeSecond s=30 #jcs.region.eplatform_disk_cache.cacheattributes.ShrinkerIntervalSeconds =60 jcs.region.eplatform_disk_cache.elementattributes=org.apache.jcs.engine. ElementAttributes jcs.region.eplatform_disk_cache.elementattributes.IsEternal=true #jcs.region.eplatform_disk_cache.elementattributes.MaxLifeSeconds=5
Re: Indexed Disk Cache Configuration
As per the source code of IndexedDiskCache, keys can also be saved and retrieved to disk and not necessarily be maintained in memory. Cache Manager which maintains cache is based on Singleton pattern and hence there can't be multiple instances pointing to same file and its running in Weblogic Portal Server sharing only one JVM. Files have got RW permissions and are in windows env. Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] cc: Subject:Re: Indexed Disk Cache Configuration All of the keys are kept in memory in JCS. That is why the keys file remains at 0. Is there more than one JVM instance pointing to this directory? When the JVM stops the problem usually goes away. Another question is what are the permissions on these files? - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:48 PM Subject: Re: Indexed Disk Cache Configuration Is there anything needs to be done in code for disk specific JCS instance like releasing file handle or something? There are two files which got created automatically, one having extension .data and other .key, but why .key extension file always has 0KB size whereas .data one expands as I put more cache items Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] cc: Subject:Re: Indexed Disk Cache Configuration I get this message when another jvm process has a reference to my indexed cache files. - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:30 PM Subject: Indexed Disk Cache Configuration I gotta use indexed disk caching and below is cache.ccf settings. When I restart my server, it gives following exception: [INFO] CompositeCache - -Constructed cache with name: eplatform_disk_cache [INFO] IndexedDiskCache - -Cache file root directory: c:\tmp [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 0 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 1 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 2 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 3 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 4 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 5 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 6 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 7 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 8 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 9 [ERROR] IndexedDisk - -java.lang.IllegalStateException: Failed to delete eplatform_disk_cache.data [ERROR] IndexedDiskCache - -Failure initializing for fileName: eplatform_disk_cache and root directory: c:\tmp java.lan g.IllegalStateException: Failed to delete eplatform_disk_cache.datajava.lang.IllegalStateException: Failed to delete ep latform_disk_cache.data at org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.reset(IndexedDisk.java :316) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.init(IndexedDis kCache.java:155) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheManager.getCache(I ndexedDiskCacheManager.java:174) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCach e(IndexedDiskCacheFactory.java:88) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary( CompositeCacheConfigurator.java:451) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:297) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:234) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Co mpositeCacheConfigurator.java:222) at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Com positeCacheConfigurator.java:148) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:244) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:227) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:185) at org.apache.jcs.engine.control.CompositeCacheManager.getInstance(Composit eCacheManager.java:130) at org.apache.jcs.JCS.ensureCacheManager(JCS.java:135) at org.apache.jcs.JCS.getInstance(JCS.java:101) at com.axa.eplatform.util.ecache.jcache.JCache.getCacheForRegion(JCache.jav a:44) at com.axa.eplatform.util.ecache.jcache.JCache.get(JCache.java:76) at
RE: Indexed Disk Cache Configuration
The diskcache keys are kept in memory until the cache is properly shutdown. You must have two vm's running, perhaps 2 instances of the portal server running, or a test program running? Aaron -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 12:28 AM To: Turbine JCS Users List Subject: Re: Indexed Disk Cache Configuration As per the source code of IndexedDiskCache, keys can also be saved and retrieved to disk and not necessarily be maintained in memory. Cache Manager which maintains cache is based on Singleton pattern and hence there can't be multiple instances pointing to same file and its running in Weblogic Portal Server sharing only one JVM. Files have got RW permissions and are in windows env. Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] cc: Subject:Re: Indexed Disk Cache Configuration All of the keys are kept in memory in JCS. That is why the keys file remains at 0. Is there more than one JVM instance pointing to this directory? When the JVM stops the problem usually goes away. Another question is what are the permissions on these files? - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:48 PM Subject: Re: Indexed Disk Cache Configuration Is there anything needs to be done in code for disk specific JCS instance like releasing file handle or something? There are two files which got created automatically, one having extension .data and other .key, but why .key extension file always has 0KB size whereas .data one expands as I put more cache items Please respond to Turbine JCS Users List [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] cc: Subject:Re: Indexed Disk Cache Configuration I get this message when another jvm process has a reference to my indexed cache files. - Original Message - From: [EMAIL PROTECTED] To: Turbine JCS Users List [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:30 PM Subject: Indexed Disk Cache Configuration I gotta use indexed disk caching and below is cache.ccf settings. When I restart my server, it gives following exception: [INFO] CompositeCache - -Constructed cache with name: eplatform_disk_cache [INFO] IndexedDiskCache - -Cache file root directory: c:\tmp [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 0 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 1 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 2 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 3 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 4 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 5 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 6 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 7 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 8 [WARN] IndexedDisk - -Failed to delete eplatform_disk_cache.data 9 [ERROR] IndexedDisk - -java.lang.IllegalStateException: Failed to delete eplatform_disk_cache.data [ERROR] IndexedDiskCache - -Failure initializing for fileName: eplatform_disk_cache and root directory: c:\tmp java.lan g.IllegalStateException: Failed to delete eplatform_disk_cache.datajava.lang.IllegalStateException: Failed to delete ep latform_disk_cache.data at org.apache.jcs.auxiliary.disk.indexed.IndexedDisk.reset(IndexedDisk.java :316) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.init(IndexedDis kCache.java:155) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheManager.getCache(I ndexedDiskCacheManager.java:174) at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory.createCach e(IndexedDiskCacheFactory.java:88) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseAuxiliary( CompositeCacheConfigurator.java:451) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:297) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegion(Com positeCacheConfigurator.java:234) at org.apache.jcs.engine.control.CompositeCacheConfigurator.parseRegions(Co mpositeCacheConfigurator.java:222) at org.apache.jcs.engine.control.CompositeCacheConfigurator.doConfigure(Com positeCacheConfigurator.java:148) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:244) at org.apache.jcs.engine.control.CompositeCacheManager.configure(CompositeC acheManager.java:227) at
Handling of too big fileupload's - exception?
Hi! i set the fileupload service to limit fileuploads to 20mb. how can i handle exceptions properly if somebody tries to upload a bigger file than the configured limit? thx, Chris -- mit freundlichen Grüßen / with kind regards Ing. Christian Jölly @ Solutions unycom Information Technology Services GmbH A-8042 Graz | Schmiedlstraße 1 / III Tel: ++43 (0)316 / 818 828 - 30 Fax: ++43 (0)316 / 818 828 - 38 [EMAIL PROTECTED] http://www.unycom.com Hey, schon IIS 5.0 ist ein Problem! Der Kunde weiß, daß er mit dem Setup in 4 Monaten spätenstens * gehackt * trojaned * oder total verwirrt ist? -- Ralf Hildebrandt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Handling of too big fileupload's - exception?
Hi Chris, i had this problem a few month ago. What i found out is a design error of the uploadservice. There is a switch somwhere in the properties where one can say if the service should handle this exception which is default or the app handles the exception, but this doesn't work properly. Im not aware if this issue is already fixed. Good luck Dieter -Ursprüngliche Nachricht- Von: Chris Joelly [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 14. Januar 2004 12:09 An: [EMAIL PROTECTED] Betreff: Handling of too big fileupload's - exception? Hi! i set the fileupload service to limit fileuploads to 20mb. how can i handle exceptions properly if somebody tries to upload a bigger file than the configured limit? thx, Chris -- mit freundlichen Grüßen / with kind regards Ing. Christian Jölly @ Solutions unycom Information Technology Services GmbH A-8042 Graz | Schmiedlstraße 1 / III Tel: ++43 (0)316 / 818 828 - 30 Fax: ++43 (0)316 / 818 828 - 38 [EMAIL PROTECTED] http://www.unycom.com Hey, schon IIS 5.0 ist ein Problem! Der Kunde weiß, daß er mit dem Setup in 4 Monaten spätenstens * gehackt * trojaned * oder total verwirrt ist? -- Ralf Hildebrandt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Handling of too big fileupload's - exception?
there is no way to do that unless you patch the setRequest method of DefaultParameterParser.class where the exception is caught and simply logged :-( regards Akmal - Original Message - From: Chris Joelly [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 12:08 PM Subject: Handling of too big fileupload's - exception? Hi! i set the fileupload service to limit fileuploads to 20mb. how can i handle exceptions properly if somebody tries to upload a bigger file than the configured limit? thx, Chris -- mit freundlichen Grüßen / with kind regards Ing. Christian Jölly @ Solutions unycom Information Technology Services GmbH A-8042 Graz | Schmiedlstraße 1 / III Tel: ++43 (0)316 / 818 828 - 30 Fax: ++43 (0)316 / 818 828 - 38 [EMAIL PROTECTED] http://www.unycom.com Hey, schon IIS 5.0 ist ein Problem! Der Kunde weiß, daß er mit dem Setup in 4 Monaten spätenstens * gehackt * trojaned * oder total verwirrt ist? -- Ralf Hildebrandt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: turbine security - viewing access in template
-Original Message- From: Mark Lybarger Sent: Wednesday, January 14, 2004 8:53 AM To: '[EMAIL PROTECTED]' Subject: turbine security - viewing access in template i looked over the turbine security guide at: http://jakarta.apache.org/turbine/turbine-2.3/howto/security-h owto.html basicaly, i'm after a method which i can check a users security (see if user's group has a particular role) from within a velocity template. i have combo box that i need to display if the user is of a c ertain security, otherwise, i need to disable the combo box and have the default option be the selected option. ie, certain users can override shipping costs when submitting an order or something like that. thanks! ~mark --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: turbine security - viewing access in template
in your velocity template you can do the following select #if ( $data.getACL().hasRole(sales) || $data.getACL().hasRole(shipping) ) option value=0shipping/option #end #if ( $data.getACL().hasRole(admin) ) option value=1admin/option #end /select On Wed, 14 Jan 2004, Mark Lybarger wrote: -Original Message- From: Mark Lybarger basicaly, i'm after a method which i can check a users security (see if user's group has a particular role) from within a velocity template. i have combo box that i need to display if the user is of a c ertain security, otherwise, i need to disable the combo box and have the default option be the selected option. ie, certain users can override shipping costs when submitting an order or something like that. thanks! ~mark Regards, Jeffery Painter - -- [EMAIL PROTECTED] http://kiasoft.com PGP FP: 9CE8 83A2 33FA 32B1 0AB1 4E62 E4CB E4DA 5913 EFBC -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U YNXabx7DZOV2Hd9LwSTmGpY= =dWiu -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: inserting user into mysql for use with turbine security
Hello Chris you should add users by using the methods exposed by the security framework. adding a user looks like (or something like that ...): user = (TorqueUser) TurbineSecurity.getUserInstance(); user.setCreateDate(new Date()); user.setName(p.getString(name)); user.setNew(true); TurbineSecurity.addUser(user,p.getString(password)); there are also methods for adding groups or roles, and for adding users to groups etc. Have a look at the java docs of the security framework ! Hope that helps /uwe Chris Joelly [EMAIL PROTECTED]An: [EMAIL PROTECTED] com.com Kopie: Thema:inserting user into mysql for use with turbine security 14.01.2004 17:37 Bitte antworten an Turbine Users List Hello! i want to insert/update an user from within my application for use with turbine security. i looked at the datamodel and have inserted the user with the following statements into TURBINE_USER and TURBINE_USER_GROUP_ROLE insert into TURBINE_USER (USER_ID, LOGIN_NAME, PASSWORD_VALUE, FIRST_NAME, LAST_NAME) values (1001, 'portal', 'portal', 'APortal', 'User'); insert into TURBINE_USER_GROUP_ROLE (USER_ID, GROUP_ID, ROLE_ID) values (1001, 1, 2); are there any other tables to set? the group and role used in this example does exist, but i can't login with this user ... thx, Chris -- mit freundlichen Grüßen / with kind regards Ing. Christian Jölly @ Solutions unycom Information Technology Services GmbH A-8042 Graz | Schmiedlstraße 1 / III Tel: ++43 (0)316 / 818 828 - 30 Fax: ++43 (0)316 / 818 828 - 38 [EMAIL PROTECTED] http://www.unycom.com Christel zu Oli (es ging um /etc/apt/sources.list): Unstable?! Bist Du bescheuert? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: inserting user into mysql for use with turbine security
Chris Joelly wrote: Hello! i want to insert/update an user from within my application for use with turbine security. i looked at the datamodel and have inserted the user with the following statements into TURBINE_USER and TURBINE_USER_GROUP_ROLE insert into TURBINE_USER (USER_ID, LOGIN_NAME, PASSWORD_VALUE, FIRST_NAME, LAST_NAME) values (1001, 'portal', 'portal', 'APortal', 'User'); insert into TURBINE_USER_GROUP_ROLE (USER_ID, GROUP_ID, ROLE_ID) values (1001, 1, 2); are there any other tables to set? the group and role used in this example does exist, but i can't login with this user ... thx, Chris I found that I had to add new users to the turbine_root role (number 1) before they could log in to the app. Not sure why this is. insert into TURBINE_USER_GROUP_ROLE (USER_ID, GROUP_ID, ROLE_ID) values (1001, 1, 1); -- Matt Hughes + [EMAIL PROTECTED] + http://spacemonkeys.ca/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: inserting user into mysql for use with turbine security
Hi, Alternately, you can specify the users/roles/groups in your turbine-security.xml conf file. For example, TurbineUser UserId=1 LoginName=admin PasswordValue=guessme FirstName=ad LastName=min/ TurbineGroup GroupId=1 GroupName=global/ TurbinePermission PermissionId=1 PermissionName=user_admin/ TurbineRole RoleId=1 RoleName=admin/ TurbineRolePermission RoleId=1 PermissionId=1/ TurbineUserGroupRole UserId=1 GroupId=1 RoleId=1/ Then, after a little monkeying around with the build.xml and build-torque.xml files, you can import this into the database: build.xml: target name=security antcall target=schema-sql/ antcall target=security-sql/ ant antfile=${torque.buildFile} target=insert-security-sql /ant /target build-torque.xml: target name=insert-security-sql description=== inserts the generated sql sql autocommit=true driver=${torque.database.driver} onerror=continue password=${torque.database.password} src=${torque.sql.dir}/turbine-schema.sql url=${torque.database.buildUrl} userid=${torque.database.user} classpath refid=torque-classpath/ /sql sql autocommit=true driver=${torque.database.driver} onerror=continue password=${torque.database.password} src=${torque.sql.dir}/turbine-security.sql url=${torque.database.buildUrl} userid=${torque.database.user} classpath refid=torque-classpath/ /sql /target Then just run 'ant security' and it will refresh all your users/groups/roles/etc. But be careful since written like this, it will blow away all the security that isn't in your xml file, so it probably most useful in dev. You can remove the first sql from the build-torque.xml file and be prepared for a bunch of primary key errors if you just want to add to your current users/groups/roles. My reply turned out to be a lot longer than I expected. And it doesn't really answer your question since you wanted something you could run from your application. But the reply was so long, I didn't want to waste it so I'm sending it anyway. Good luck, David -Original Message- From: Chris Joelly [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 8:38 AM To: [EMAIL PROTECTED] Subject: inserting user into mysql for use with turbine security Hello! i want to insert/update an user from within my application for use with turbine security. i looked at the datamodel and have inserted the user with the following statements into TURBINE_USER and TURBINE_USER_GROUP_ROLE insert into TURBINE_USER (USER_ID, LOGIN_NAME, PASSWORD_VALUE, FIRST_NAME, LAST_NAME) values (1001, 'portal', 'portal', 'APortal', 'User'); insert into TURBINE_USER_GROUP_ROLE (USER_ID, GROUP_ID, ROLE_ID) values (1001, 1, 2); are there any other tables to set? the group and role used in this example does exist, but i can't login with this user ... thx, Chris -- mit freundlichen Grüßen / with kind regards Ing. Christian Jölly @ Solutions unycom Information Technology Services GmbH A-8042 Graz | Schmiedlstraße 1 / III Tel: ++43 (0)316 / 818 828 - 30 Fax: ++43 (0)316 / 818 828 - 38 [EMAIL PROTECTED] http://www.unycom.com Christel zu Oli (es ging um /etc/apt/sources.list): Unstable?! Bist Du bescheuert? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Turbine and Hibernate again
Howdy, I was following the discussion last month about integrating Turbine and Hibernate. One of the last comments on the subject was a pointer to the Hibernate HowTo in the Turbine How To pages. I've looked it over and for the most part it's pretty simple/understandable. However, I do not quite understand what the need for the hibernate-avalon jar is. What does that supply? From the rest of the code examples and discussion, it would appear that I could integrate hibernate (as done in these examples) without it. Most critical to me though is replacing Turbines reliance on Torque for the user security functions. There was some discussion about having created a replacement security system for Turbinbe/Hibernate, but I'm not sure what steps to take to do this. What code, what config items, etc, etc. Finally, other than being redundant, is there anything we would loose, functionality wise, in Turbine if we just didn't use any of the security stuff and used our own method? Ideally, I think reusing code would be best if we can make it fit, but I'd like to explore the options available to us. Any help here would be appreciated - even if it's just pointers. We've gotten through the testing stage and are very happy with Turbine. Now we need to move on to real development and this is about all that is holding us up right now. Thanks in advance, Gerry -- Gerry Duprey SchoolsOPEN, LLC 123 North Ashley, Suite 120 Ann Arbor, MI 48104 Phone (877) 483-1944 Ext. 401 Fax (734) 661-0819 Visit us Online at www.Schools-OPEN.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Turbine and Hibernate again
On Wed, 2004-01-14 at 21:14, Gerry Duprey wrote: Howdy, I was following the discussion last month about integrating Turbine and Hibernate. One of the last comments on the subject was a pointer to the Hibernate HowTo in the Turbine How To pages. I've looked it over and for the most part it's pretty simple/understandable. However, I do not quite understand what the need for the hibernate-avalon jar is. What does that supply? From the rest of the code examples and discussion, it would appear that I could integrate hibernate (as done in these examples) without it. Turbine has always had a framework for providing a range of services to web applications. The earlier services framework was based on jakarta-turbine-stratum. More recently, a lot of work has been done on service frameworks and one such project is apache Avalon. This framework was chosen to replace the stratum framework in turbine. The hibernate-avalon jar provides an api and implementation which makes hibernate available as a service following the avalon framework conventions. Hibernate could, of course, be integrated into turbine without it but IMHO this would be a backward step. If you are interested in why, go to the avalon.apache.org pages and look for information on 'Separation of Concerns' (SOC) and 'Inversion of Control' (IOC). Most critical to me though is replacing Turbines reliance on Torque for the user security functions. There was some discussion about having created a replacement security system for Turbinbe/Hibernate, but I'm not sure what steps to take to do this. What code, what config items, etc, etc. There are a number of implementations of a security service in the jakarta-turbine-fulcrum packages. I'm not sure how good the documentation is but the code is there. Finally, other than being redundant, is there anything we would loose, functionality wise, in Turbine if we just didn't use any of the security stuff and used our own method? Ideally, I think reusing code would be best if we can make it fit, but I'd like to explore the options available to us. I believe that the roadmap for turbine includes the breaking out of some of the highly coupled code which still exists into individual components which can lead to more flexibility in implementation. Following that, there has been talk of implementing some sort of pipeline or filterchain of components such as security, action loader, page loader etc. , allowing these to be switched in and out quickly and easily. Any help here would be appreciated - even if it's just pointers. We've gotten through the testing stage and are very happy with Turbine. Now we need to move on to real development and this is about all that is holding us up right now. In most of the applications that I have written with turbine, I have written my own security service. A look at the TemplateSessionValidator, TurbineAccessControlList, VelocitySecureScreen and VelocitySecureAction classes will start to point you in the right direction. Thanks in advance, Gerry I hope that this helps. Peter -- Peter Courcoux [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to support UI controls in Velocity template
Hi, what's a better way to support UI controls in Velocity tempalte ? I am looking for something like menu controls, paging for large data (displaying data in a table with multiple pages, back and forward buttons) that can put into a Velocity template. thanks li xin __ Do you Yahoo!? Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]