[ANNOUNCEMENT] Apache Commons JCS 3.2 Released
The Apache Commons JCS team is pleased to announce the Apache Commons JCS 3.2 release! Apache Commons JCS is a distributed, versatile caching system. Changes in this version include: Fixed Bugs: o Fix OSGi manifest Issue: JCS-234. Thanks to Chris Lake. o Handle ServiceConfigurationError when using a different logging framework Issue: JCS-232. Thanks to Jeremy Long. o Fix Lateral TCP cache recovery loop for empty TCP servers Issue: JCS-231. Thanks to Andrea Vettori. o UDPDiscoveryReceiver with EncryptingSerializer fails #88. Issue: JCS-230. Thanks to Dorota Oeknigk-Urbanska. o LateralTCPListener class uses always StandardSerializer #89. Issue: JCS-229. Thanks to Dorota Oeknigk-Urbanska. Changes: o Bump actions/cache from 2.1.7 to 3.0.9 #86, #111. Thanks to Dependabot, Gary Gregory. o Bump actions/checkout from 2 to 3.0.2 #93. Thanks to Dependabot, Gary Gregory. o Bump actions/setup-java from 2 to 3.5.1. Thanks to Gary Gregory. o Bump commons-parent from 52 to 58 #90, #130, #154. Thanks to Dependabot. o Bump log4j-api from 2.17.1 to 2.20.0 #85, #100, #107, #145. Thanks to Dependabot. o Bump log4j-core from 2.17.1 to 2.20.0 #87, #99, #108, #144. Thanks to Dependabot. o Bump commons-text from 1.9 to 1.10.0 #110. Thanks to Dependabot. o Bump commons-io from 2.11.0 to 2.12.0. Thanks to Gary Gregory. For complete information on Apache Commons JCS, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Commons JCS website: https://commons.apache.org/proper/commons-jcs/ Download it from https://commons.apache.org/proper/commons-jcs/download_jcs.cgi Thomas Vandahl Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 3.1
The Apache Commons project announces the release of Apache Commons JCS 3.1. Apache Commons JCS is a distributed caching system written in Java. It is intended to speed up applications by providing a means to manage cached data of various dynamic natures. JCS 3.0 and onwards require at least Java 8. JCS 3.1 uses log4j as an optional component only. Nevertheless, the dependency has been updated to address the Log4Shell issues. This is a feature and bug fix release. For a list of changes in this release see: https://commons.apache.org/proper/commons-jcs/changes-report.html#a3.1 For complete information on Apache Commons JCS, including instructions on how to submit bug reports, patches, or suggestions for improvement, see the Apache Apache Commons JCS website: https://commons.apache.org/proper/commons-jcs/ Download page: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi Have fun! - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [jcs] Invalid Class Exception help needed
Hi Stuart, On 22.01.21 08:26, Stuart Maclean wrote: I have a cache region whose key type is say String and whose value type is some class C. C is Serializable. I use the cache, so objects of class C go into that region. The cache is backed by disk, so objects of class C end up in files. C may then change, such that its serialVersionUID changes. If so, what I want to happen is that when I do a I guess what you are looking for happens in e.g. org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.readElement(K) In this method, the ClassNotFoundException from deserialization is wrapped into an IOException. This exception is then caught by org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.processGet(K) In the catch clause, reset() is called, which clears the cache. So actually the behavior you are asking for actually should be there. If you need more detailed control, you may provide your own org.apache.commons.jcs.engine.behavior.IElementSerializer and use the object validation features described in java.io.ObjectInputStream.registerValidation(ObjectInputValidation, int) You will have to create the disk cache programmatically then, as the IElementSerializer cannot be set via configuration. HTH Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [jcs] Maven - Commons JCS 3
On 30.10.20 21:57, tolai...@ups.com.INVALID wrote: Is the Commons JCS 3 library going to be published to Maven? What is wrong with https://repo1.maven.org/maven2/org/apache/commons/commons-jcs3-core/3.0/commons-jcs3-core-3.0.jar ? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 3.0 Released
The Apache Commons Team is pleased to announce the availability of Apache Commons JCS 3.0 Apache Commons JCS is a distributed, versatile caching system. This has been a major overhaul of JCS with many adjustments for JDK 8+, better concurrency and logging. Commons JCS 3.0 requires Java 8 or later. The release notes can be reviewed at: http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt Distribution packages can be downloaded from: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi When downloading, please verify signatures using the KEYS file available at: http://www.apache.org/dist/commons More information and comprehensive documentation is available at: https://commons.apache.org/proper/commons-jcs/ Maven artifacts are also available in the central Maven repository: http://repo1.maven.org/maven2/org/apache/commons/jcs3 The Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [csv] Slicing through CSVRecords
Hi Siegfried, Happy New Year btw.! On 31.12.18 15:34, Siegfried Goeschl wrote: > somehow I’m working a lot with ad-hoc scripting and commons-csv and it would > be helpful to have additional functionality slicing through CSV records, e.g. > > * group CSVRecord by the value of column > * get a list of distinct values from a column > > No rocket science but to avoid typing the same code over and over > > * has anyone implemented that already and I’m just unaware of it > * if not - could this be a valuable contribution? I prefer SuperCSV (http://super-csv.github.io/super-csv/) for tasks like this. It supports bean mapping and cell-processors which makes record handling super easy. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 2.2 Released
The Apache Commons Team is pleased to announce the availability of: Apache Commons JCS 2.2 Apache Commons JCS is a distributed, versatile caching system. The release notes can be reviewed at: http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt Distribution packages can be downloaded from: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi When downloading, please verify signatures using the KEYS file available at: http://www.apache.org/dist/commons More information and comprehensive documentation is available at: https://commons.apache.org/proper/commons-jcs/ Maven artifacts are also available in the central Maven repository: http://repo1.maven.org/maven2/org/apache/commons/ The Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[jcs] Re: Can JCS have update events?
On 08.04.17 14:40, robertlazarski . wrote: > We need update events because our code already uses them - we are > replacing our current cache libs (ehcache) with another lib - > preferably JCS. > > More specifically, our local cache is filled with stock prices via a > "HTTP server push" stream and on updates we need to perform some > additional calculations using events and listeners. Although I strongly believe that this should be handled outside the scope of the cache, I think that update events could be added to JCS quite easily. JCS does not support this at the moment. The best place to add such a feature probably would be CompositeCache.update() and remove(), respectively. Please be sure to take the asynchronous nature of event handling into account. > I looked a lot at the JCS code and didn't find update events, which is > why I looked at the JCS JCache implementation. Apparently JSR-107 > didn't define persistence though. I notice some other projects have a > JSR-107 "CacheStore" for disk persistence but to be clear I definitely > want to use JCS. The JCache implementation actually is just a wrapper around JCS, so all features of JCS, including the disk auxiliary should be available from JCache, too. I'm only maintaining the core of JCS, so I cannot speak from JCache experiences here. > Saying this as humbly as possible as clearly I am not a Cache expert , > I am an Apache Axis2 committer plus I have done several Linux related > contributions and I would be willing to submit patches if I end up > having to "scratch my own itch" . Of course though I would rather use > an API that already exists. Patches are always welcome. However I still suggest to reconsider putting data manipulations into the scope of the cache, independently of the library used. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Can JCS have update events?
Please use [jcs] as a prefix to the subject when posting to us...@commons.apache.org. On 06.04.17 18:21, robertlazarski . wrote: > I am coding a simple local "Indexed Disk Auxiliary Cache" and > IsEternal=true using JCS, and I can't figure out how to have an > onUpdate() event. Is there update events in JCS? Why are you coding the cache? This should only need configuration. Why do you think you need update events? > I looked at the JCS implementation of JCache events and it looks like > what I need, but I can't figure out how to do disk persistence with > JCS / JCache as I can't find any code examples. Did you read the docs at https://commons.apache.org/proper/commons-jcs/IndexedDiskAuxCache.html? The configuration example on that page is basically all you need. See https://commons.apache.org/proper/commons-jcs/JCSPlugins.html for a description of JCS' concept of auxiliaries. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [jcs] Migrating from Ehcache to JCS, need help getting the right config
On 23.03.17 15:01, robertlazarski . wrote: > Thanks for the response! That helped a lot. I am about to start coding > but I am trying to figure out #3. Please see below. The cache warming itself is not a big deal. Just call getKeySet() on the memory cache and call get() for all keys. This will load the values from disk into the memory cache. The question is just where to insert the loop into the application initialization. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [jcs] Migrating from Ehcache to JCS, need help getting the right config
Hi there, On 21.03.17 15:50, robertlazarski . wrote: > Hello! We have a production system running Ehcache and we'd like to > use JCS instead. What I need to do with JCS is: > > 1) Load all Objects into memory, unlimited with infinite "time to > live". In practice over many years, its not been a problem for us. > Currently using LRU. Yes, this is easy, just define a memory cache big enough to hold all your objects. Set jcs.default.elementattributes.IsEternal=true > 2) Store Objects from memory to disk on JVM shutdown, or at least > periodically flush to disk - while keeping the entire cache in memory. See https://commons.apache.org/proper/commons-jcs/IndexedDiskAuxCache.html for the configuration of an auxiliary disk cache. If you have configured your memory cache big enough, no "overflow" of items to disk will happen in normal operation. You need to shut down the cache orderly (CompositeCacheManager.getInstance().shutDown()) to trigger the "dump to disk" process. There is no simple method to do this periodically. > > 3) Most importantly, on server startup we need the entire disk > persisted cache loaded into memory, i.e. "cache warming" . I am > wondering if the CacheLoaderAdapter is the right class for this? > Currently we use a class that Ehcache calls on startup that just uses > an Iterator over all the cache Elements, effectively loading > everything into memory. This can be achieved by setting ClearDiskOnStartup=false. This happens to be the default. JCS will load all the keys into memory then but not the values. So if you want the values to be loaded, just modify the class you used for EHCache. How to integrate this into your application depends on your application lifecycle. There is no CacheLoaderAdapter class in JCS. If you tell me a bit more about your application, I might be able to give you a hint. HTH Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 2.1 Released
The Apache Commons Team is pleased to announce the availability of: Apache Commons JCS 2.1 Apache Commons JCS is a distributed, versatile caching system. The release notes can be reviewed at: http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt Distribution packages can be downloaded from: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi When downloading, please verify signatures using the KEYS file available at: http://www.apache.org/dist/commons More information and comprehensive documentation is available at: https://commons.apache.org/proper/commons-jcs/ Maven artifacts are also available in the central Maven repository: http://repo1.maven.org/maven2/org/apache/commons/ The Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS : element expires sooner than configured
Ouch, that hurt. I'm sorry, this is a problem with ElementAttributes.clone() not updating createTime. I fixed it in trunk. Could you try if it works for you? Bye, Thomas -- tv > Am 23.01.2017 um 10:48 schrieb Sahib Bin Mahboob Ron: > > Hi, > > I am trying to configure a JCS using the following configuration: > > # DEFAULT CACHE REGION > > jcs.default= > jcs.default.cacheattributes= >org.apache.commons.jcs.engine.CompositeCacheAttributes > jcs.default.cacheattributes.MaxObjects=1000 > jcs.default.cacheattributes.MemoryCacheName= >org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache > > jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes > jcs.default.elementattributes.IsEternal=false > jcs.default.elementattributes.MaxLife=300 > jcs.default.elementattributes.IsSpool=false > > > While it is expected to expire the item in 300 seconds as per MaxLife > configuration, it does not work properly in following steps: > > 1. Putting a key "aKey" for the first time in cache: It works perfectly. > 2. "aKey" expires after 300 seconds. > 3. Put "aKey" again on the cache. > 4. It expires immediately. > > Am I missing any configuration or this is the way it should behave? > > - Sahib - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 2.0 Released
The Apache Commons Team is pleased to announce the availability of: Apache Commons JCS 2.0 Apache Commons JCS is a distributed, versatile caching system. The release notes can be reviewed at: http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt Distribution packages can be downloaded from: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi When downloading, please verify signatures using the KEYS file available at: http://www.apache.org/dist/commons More information and comprehensive documentation is available at: https://commons.apache.org/proper/commons-jcs/ Maven artifacts are also available in the central Maven repository: http://repo1.maven.org/maven2/org/apache/commons/ The Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS 2.0-beta-2: ShrinkerThread: Unexpected trouble in shrink cycle
On 26.11.16 16:07, Kirys wrote: > [C]2016-11-26 15:56:00,070|JCS-Scheduler-Thread-21|INFO > o.a.c.j.e.m.s.ShrinkerThread: Unexpected trouble in shrink cycle > java.lang.NoClassDefFoundError: > org/apache/commons/jcs/engine/control/group/GroupAttrName This looks like a class-loader issue between threads. The class mentioned is included in the commons-jcs-core jar and the application should have no problems loading it. I'm not familiar with the TomEE environment. Can you try to reproduce the problem outside this context? Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [ANNOUNCE] Apache Commons JCS 2.0-beta-2 Released
On 16.11.16 14:56, Tim Cronin wrote: > when will it be accessible via maven/ivy repo? It already is: http://repo1.maven.org/maven2/org/apache/commons/commons-jcs-core/2.0-beta-2/ Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons JCS 2.0-beta-2 Released
The Apache Commons Team is pleased to announce the availability of: Apache Commons JCS 2.0-beta-2 Apache Commons JCS is a distributed, versatile caching system. The release notes can be reviewed at: http://www.apache.org/dist/commons/jcs/RELEASE-NOTES.txt Distribution packages can be downloaded from: https://commons.apache.org/proper/commons-jcs/download_jcs.cgi When downloading, please verify signatures using the KEYS file available at: http://www.apache.org/dist/commons Maven artifacts are also available in the central Maven repository: http://repo1.maven.org/maven2/org/apache/commons/ The Apache Commons Team - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Apache JCS 2.0 beta 2?
Hi Ryan, On 23.09.16 22:54, Ryan Fong wrote: > G'day, all. I've submitted a couple of patches towards Apache JCS 2.0 beta-2 > a few months back. I've also been seeing some errors like JCS-146 which have > already been fixed but are not available in a download. However, I don't see > any activity or intent to build a new beta-2 or a release candidate. Is this > project still active? What are the release expectations? > your contributions are very much appreciated. I'm currently working on JCS-130 to clean up the inter-dependencies of managers, factories, services and stuff. Before releasing 2.0, I wanted to get this finished. Unfortunately, I have very little time for open source development at the moment so this takes longer than I expected. In the meantime you can use a fairly recent build (currently 2016-08-07) from the snapshot-repository at https://repository.apache.org/content/groups/snapshots/org/apache/commons/commons-jcs-core/2.0-SNAPSHOT/ HTH Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]
Hi Mat, On 03.02.16 17:44, Mat Jaggard wrote: > I have three patches that might be helpful... > > 1. Javadoc changes to make it compile on my machine > 2. Server port changes which may (or may not) fix the continuum unit > test issue > 3. Change to the way existing tables are detected (I think I got a > different SQL error code) Thanks again for contributing. I applied patches 1 and 2. I'm not so sure about 3. The check for SQL state 23000 is quite common. We use the same check in DB Torque for several different database systems with good success. What error message did you get? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]
On 02.02.16 11:22, Mat Jaggard wrote: > I've submitted my pull request. > > https://github.com/apache/commons-jcs/pull/2 > > On Mon, 1 Feb 2016 at 16:32 Gary Gregorywrote: > >> It is, github is just a mirror. You submit a patch with the Jira if you >> prefer. Thanks for your contribution. How do I merge this into SVN now? I'm not familiar with github. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [configuration] How to read an INI Configuration with brackets as list separator
On 25.08.15 07:55, Patrick Brunmayr wrote: Hello How can i read a configuration like that ? [RESPONSE] code = 200 description = Command completed successfully queuetime = 0 runtime = 0.006 property[count][0] = 164 property[domain][0] = xxx property[domain][1] = xxx property[domain][2] = xxx Hi Patrick, list separators are for values, not keys. See the JavaDoc for HierarchicalINIConfiguration for a way to handle files like this. You may want to check out the section http://commons.apache.org/proper/commons-configuration/userguide_v1.10/howto_xml.html#Accessing_structured_properties of the users guide for possibilities to access your data. Using the XPathExpressionEngine might cover your case but that's just a wild guess. HTH Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
On 06.07.15 15:37, Tim Cronin wrote: is there any documentation on migrating from 1.3 to 2? Not yet. I started to write something, but I have yet to finish it. the JCSAdmin.jsp the FAQ link is broken. moved due to package change http://svn.apache.org/viewvc/commons/proper/jcs/trunk/commons-jcs-core/src/main/java/org/apache/commons/jcs/admin/JCSAdmin.jsp?view=log Thank you for the hint I will fix this. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
On 06.07.15 17:06, Tim Cronin wrote: I added the following before calling the composite cache shutdown. this should be called via the composite cache shutdown code i think ThreadPoolManager poolMgr = ThreadPoolManager.getInstance(); for(String poolName : poolMgr.getPoolNames()) { try { poolMgr.getPool(poolName).shutdown(); } catch (Throwable t) { LOGGER.warn(Failed to close pool + poolName, t); } } Thank you for your contributions I'll try to take care of these. Please not that these problems also have been present in 1.3. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
On 06.07.15 16:33, Tim Cronin wrote: MaxLifeSeconds has been changed to MaxLife, didn't find anything in the docs about this change. See http://commons.apache.org/proper/commons-jcs/RegionProperties.html Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Region No longer alive so returning false for key
On 02.07.15 15:13, Tim Cronin wrote: JCS 1.3 i periodically get the above error. what do i need to do to recover from this? First of all I'd suggest to try out commons-jcs 2.0-beta1. It contains numerous fixes and cleans up the lifecycle of most of the JCS manager classes. If that doesn't help, come back and ask again as this would require deeper digging. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Error starting web service with JCS on WAS 8.5.5 (Linux only)
Hi Barry, On 01.06.15 02:09, Barry Lulas wrote: Hello, I have created a web service for WebSphere that uses a basic JCS configuration. When I package and deploy for WAS under Windows on my local machine I have no issues. When I deploy that same .ear file to my WAS running on Linux I get the following exception when I try to start my service in the WAS console: [6/1/15 2:00:51:875 CEST] 0093 BeansDeployer E BeansDeployer deploy java.lang.NullPointerException at java.util.Properties.load(Properties.java:356) at org.apache.commons.jcs.jcache.JCSCachingManager.readConfig(JCSCachingManager.java:95) at org.apache.commons.jcs.jcache.JCSCachingManager.init(JCSCachingManager.java:70) at org.apache.commons.jcs.jcache.JCSCachingProvider.getCacheManager(JCSCachingProvider.java:56) at org.apache.commons.jcs.jcache.extras.cdi.ExtraJCacheExtension.addJCacheBeans(ExtraJCacheExtension.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at org.apache.webbeans.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:285) at org.apache.webbeans.event.NotificationManager.fireEvent(NotificationManager.java:455) at or g .apache.webbeans.container.BeanManagerImpl.fireEvent(BeanManagerImpl.java:452) at org.apache.webbeans.config.BeansDeployer.fireAfterBeanDiscoveryEvent(BeansDeployer.java:269) at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:180) at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124) at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78) at com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106) at com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:613) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:409) at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHost I mpl.java:169) at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749) at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1177) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:776) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1379) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start ( ApplicationMgrImpl.java:2189) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5477) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5603) at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611) at com.ibm.ws.runtime.compo n ent.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1269) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:87) at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) at
Re: can # sometimes be ignored by JCS
On 10.03.15 23:12, arnout cator wrote: Hi, I have the situation that I have 10+ web apps using JCS. I have this in cache.ccf: ### # Stylesheet settings ### #disable disk caching if WAS doesn't provide serialized dom #jcs.region.stylesheet= jcs.region.stylesheet=DC jcs.region.stylesheet.cacheattributes.MaxObjects=128 ### I have no issues with all other regions defined, but I have a problem that sometimes amongst the 10 web apps, not consistently the same web apps, the stylesheet cache is not invalidated when I do a code release to the 10 apps. I get over it by removing all disk cache files and restarting the app server. I wondered if it is possible that JCS sometimes reads the # line. Can that be causing this? This is very unlikely because JCS uses the standard JDK methods to read its configuration files. If not, why would just the stylesheet disk cache file not be invalidated sometimes? Did anyone in JCS user world see a similar event? I'm not sure I understand your environment correctly. Do you generally expect the cache contents to survive an application restart or not? The disk cache will persist keys and data during an orderly shutdown so that they can be reloaded on restart. This normally requires JCSServletContextListener to be present in the web application. However JCS also registers a shutdown hook to the JVM which may or may not work in an app-server environment. This would explain the inconsistent behavior you are experiencing. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JSC 1.3 thread cleanup
On 23.01.15 15:16, Tim Cronin wrote: ok, thanks how different is 2 vs. 1.3? First of all it is unreleased as of yet. The main change is the use of the class CacheAccess instead of JCS when using caches. Due to the move to Apache Commons, the package has changed from org.apache.jcs to org.apache.commons.jcs. This will affect existing configuration files. Other than that, your code should continue to work. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JSC 1.3 thread cleanup
On 22.01.15 17:42, Tim Cronin wrote: I'm getting tomcat errors on shutdown: 2015-01-22 16:41:51,186 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoader- The web application [/api] appears to have started a thread named [ElementEventQueue.QProcessor-1] but has failed to stop it. This is very l ikely to create a memory leak. i tracked it down to org.apache.jcs.engine.control.CompositeCache: /** * EventQueue for handling element events. 1 should be enough for all the regions. Else should * create as needed per region. */ public static IElementEventQueue elementEventQ = new ElementEventQueue( AllRegionQueue ); then calling CompositeCache.elementEventQ.destroy(); but it can be flaky and IMO should be handled via CompositeCacheManager.shutdown(). is there a better way to handle this and do i need to file a bug on this? This has already been fixed in the current trunk. You may check out the code and see if it works. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Dynamic Cache Expiration on get
Hi Jan, On 16.01.15 17:12, Jan Swaelens wrote: Hello, I have a region set up to expire its data lets say after 60 seconds. There's also a shrink thread running every 100 seconds. We add an event handler when storing certain items, in this handler we implement some logic to re-insert the expired item on the same key. The problem is, when an item expires 'on get' the expiry handler fires async and we can't get the updated value in the requesting thread. Is it possible to act before the item is actually removed to take the keep/toss away call instead of re-inserting it? Any other suggestions for solving this pattern? I understand you want to update your items when they expire, right? This is normally done in the requesting thread, when the cache returns null for the requested key. In my experience, this absolutely makes sense because you will have connections, access rights and stuff available there. This is usually not the case in a background thread. That said, I'd like to add that you may add your own implementation of a memory cache with the desired expiry behavior. See the way the key lists are handled in LRUMemoryCache and MRUMemoryCache. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] disk persistence - same conf file, different results
On 17.11.14 14:49, Tim Cronin wrote: Any ETA on when JCS 2.0 will be released? There is a vote running currently for 2.0 alpha 1. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] disk persistence - same conf file, different results
On 14.11.14 13:47, joao tiago a. m. viegas wrote: I'll probably reformat this question in a simpler way. The goal is to persist an element and retrieve it after restart of a new vm. The disk caches persist the keys when the cache is shut down. So you should call CompositeCacheManager.getInstance().shutDown(); before your application ends. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] disk persistence - same conf file, different results
On 14.11.14 18:03, Thomas Vandahl wrote: On 14.11.14 13:47, joao tiago a. m. viegas wrote: I'll probably reformat this question in a simpler way. The goal is to persist an element and retrieve it after restart of a new vm. The disk caches persist the keys when the cache is shut down. So you should call CompositeCacheManager.getInstance().shutDown(); before your application ends. To be precise: You cannot shut down the cache in the middle of a process because with jcs 1.3 the cache will not re-initialize correctly. This should have been fixed to a large extent in jcs 2.0 but still needs further work. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS Cache behaviour question
On 24.10.14 00:48, arnout cator wrote: Can someone tell me how JCS works to show Auxiliary hits and no data file size nor key size, considering my setup? JCS keeps the disk cache files open during operation. So depending on your operating system, you may not see updates of the directory entries of these files. If you shut down JCS properly, the files will be closed and the size should reflect the actual content. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Remote Cache causes Tomcat Windows Service to hang on shutdown.
On 06.10.14 15:55, Art Thursland wrote: Here is the part of the log written during shutdown: 09:42:18,899 INFO [RemoteCacheStartupServlet] Shutting down remote cache 09:42:18,903 INFO [CompositeCache] In DISPOSE, [tokenCache] fromRemote [false] Region Name = tokenCache HitCountRam = 0 HitCountAux = 0 ---LRU Memory Cache List Size = 0 Map Size = 0 Put Count = 0 Hit Count = 0 Miss Count = 0 09:42:18,903 INFO [CompositeCache] In DISPOSE, [tokenCache] disposing of memory cache. 09:42:18,903 INFO [AbstractMemoryCache] Memory Cache dispose called. Shutting down shrinker thread if it is running. Could you please switch the log level to DEBUG and post the log section? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: correct estimate of the disk cache size
On 09.10.14 17:43, arnout cator wrote: jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=250 That's the key here. In general, you would expect the cache size that you calculated. However, considering the way the disk cache works, this is only true if your data objects are of exactly the same size (which is very improbable). So if a new data object is somewhat bigger than the previously expired one, the cache will append to the cache file and the file will grow. If you want to have better control over your disk usage, I'd recommend to test the BlockDiskCache. It may fit your use case better. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS cache benchmarking for performance
On 09.10.14 16:02, arnout cator wrote: What would be the best practice in monitoring JCS caching performance for production web applications? I am looking for a way to collect data and then give advice on sizing of web applications that heavily use JCS for caching of java objects. Which version do you use? If 1.3, then your best bet would be JCSAdminBean or JCSAdmin.jsp, respectively. It can tell you about the filling level as well as hits, fails, auxiliary hits and fails and much more. It will not give you timing information, however. In 2.0, you may use JMX to access this information. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [math] Curve fitting ...
I take it, you ask for help for doing your homework? Bye, Thomas Am 14.08.2014 um 15:56 schrieb South Light southligh...@gmail.com: Hi Ted, Thanks a lot for your suggestion but I need to add it using java. Thanks again . 2014-08-14 2:22 GMT-03:00 Ted Dunning ted.dunn...@gmail.com: Have you considered using an interactive system like R, Matlab or Octave? You might be happier. Or even have you considered goal search in Excel? On Wed, Aug 13, 2014 at 6:08 PM, South Light southligh...@gmail.com wrote: Hi, May be someone can help me with this problem. Given the follow function: y = 10 ^ ((x + 82) / (-10 * A)) I would like to found the A value witch curve fit better for a set of x,y values, usually the set is about 20 to 25 x,y values. I use the CurveFitter class and the ParametricUnivariateFunction ParametricUnivariateFunction function = new ParametricUnivariateFunction() { @Override public double[] gradient(double x, double[] params) { (? comment) } @Override public double value(double x, double[] params) { double a = params[0]; return Math.pow(10, ((x + 82) / ( -10 * a ) )); } }; LevenbergMarquardtOptimizer optimizer = new LevenbergMarquardtOptimizer(); CurveFitterParametricUnivariateFunction fitter = new CurveFitterParametricUnivariateFunction(optimizer); double[] x = { -82 , -85 , -89 }; double[] y = { 1 , 1.4 , 2 }; for (int i = 0; i x.length; i++) fitter.addObservedPoint(x[i], y[i]); double[] result = fitter.fit(function, new double[] { 1, 10 }); A. Is this the best way to solve the problem or there's another better way? B. What do we need to write on the gradient area (? comment) ? Any help will be more then welcome. Many thanks !! - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] event handler callback not getting called
On 19.03.14 18:25, sebb wrote: But when an element is evicted from JCS cache im not getting any callback though i know cache eviction has happened for element for sure. Is there anything else that i need to do apart from what is mentioned in the example. Would you please open an issue in JIRA with this sample code and the related configuration attached? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Version 2 release
On 04.02.14 16:52, Gary Gregory wrote: I think the biggest hurdle to releasing [JCS] 2.0 is finding a [Commons] committer willing to put in the time to go over the component and act as the release manager. Well, I'm actually doing what I can. My hesitation partly comes from the fact that the test results within the Continuum build are not in line with mine. Any help will be appreciated as this is going to be my first release within Apache Commons. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Version 2 release
Gary, On 08.02.14 17:34, Gary Gregory wrote: Mat, I would suggest getting familiar with the code base in trunk. Can the code be released as is or are there problems? Should some issues in Jira be fixed for this release? Major releases like a 2.0 from 1.x are the only time APIs can break binary compatibility which means that the package name must change and the Maven coords as well. Does the current code even warrant the 2.0 label or would a 1.x dump be a better representation of what is in trunk? Rest assured that all these things have been taken care of. The API *has* changed and the modifications *are* substantial. A look into the commits of the last two years should show that. Mat, if you want to help, please check that the build and all tests are working fine for you. Note that some tests are disabled in the POM as they seem to be timing sensitive. I did my best to fix these problems, however. The documentation does not yet reflect the recent API changes. I'll fix this as soon as I can. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [jcs] Re: JCS disk only and expiration config question
On 25.09.13 19:25, JavaWebDev wrote: There doesn't seem to be a a DiskShrinker like there is a memory shrinker so it looks like the objects stored on disk will only be removed passively when retrieved and identified as expired? I'll look into the Recycle bin more. See the method IndexedDiskCache.optimizeFile(). This will be called if OptimizeAtRemoveCount 0 and removeCount OptimizeAtRemoveCount. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[jcs] Re: JCS disk only and expiration config question
Hi JavaWebDev, first of all, the usage of clear names of real persons would be very much appreciated. On 24.09.13 21:27, JavaWebDev wrote: First. The user and dev mailing lists haven't been active lately and the wiki seemed outdated in some sections. (ex: no longer a .commons package). Is JCS still being worked on? I chose it because it seems faster than ehcache and I need the disk cache to persist across servlet container restarts. The latest commits were just four weeks ago. Currently, I'm maintaining this alone. All contributions would be welcomed. Ideally I'd like to write cache to disk immediately in case the servlet crashes without being able to call dispose(). Should I set MaxObjects to 0 in the region definition of cache.ccf? See the documentation of the purgatory at http://commons.apache.org/proper/commons-jcs/IndexedDiskAuxCache.html. If you set the size of the purgatory to 0 your performance will suffer seriously. Mind you, JCS is a cache, no data store. I'd like the objects in disk cache to expire after 7 days. Which configuration parameter(s) do I need to change? Expiry is handled by the memory cache. Empty spots in the disk cache will be reused. If you want to clean up every now and then, you may want to play with the configuration options OptimizeAtRemoveCount and MaxReycleBinSize. HTH. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Remote Cache
On 25.06.2013 14:03, Sunil Kumar P wrote: Hi , i'm new to JCS ! i was trying out Remote Cache ! In Failover Server i have confiured two Server . When primary Server is down . Data in cache is not empty secondary Server . Please Find Below Configuration Primary Server is 10.44.71.15 9000 and Secondary Server is 10.44.71.14 9000 When i get Connection refused for 71.15 ! Data in Cache is not received in 71.14 Server ! Please Help me OUt I cannot see anything wrong in this configuration snippet. Please configure a logger for org.apache.jcs at level DEBUG and check the initialization sequence of the caches in the logs. JCS is quite chatty in DEBUG mode. You should be able to see what goes wrong. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS Lateral Cache
Hi Jean-Marc, On 25.02.13 04:18, Jean-Marc Spaggiari wrote: Regarding DC + LTCP vs LTCP, is that an issue? Becaue if I stop all the nodes, I don't want them to have to re-query everything. No, actually, it should not be an issue. However, if you want to clarify the behavior of the LTCP cache I'd suggest to first make sure it does what it should do. Only after you are satisfied with the results, re-introduce the disk cache. If I stop a node, then I restart it, other servers will see that and will display the message above. Are they really disabling totally the lateral cache because of that? If yes, then it's an issue for my needs. Normally, JCS constantly tries to fix broken caches. So I'd expect the connection to be re-established. LateralCacheMonitor is responsible for this. You should see the log outputs of that class later in the log. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS Lateral Cache
On 08.02.13 14:06, Jean-Marc Spaggiari wrote: Thanks for jumping in. JCS became my playground by accident, after all. :-) props.put(jcs.region.robotCache, DC, LTCP); I'm not sure if it makes sense to have two auxiliaries for the region. I'd try to get the lateral thing working first. props.put(jcs.auxiliary.LTCP.attributes.AllowGet, true); Try to set this to false. The idea is that if some member of the lateral cache puts an item, it will be distributed to all the others. So there is actually no need to allow gets throughout the group. 2013-02-08 07:41:27,243 [CacheEventQueue.QProcessor-robotCache] ERROR org.apache.jcs.auxiliary.lateral.socket.tcp.LateralTCPSender - ... There is not much we can do about this in 1.3 Would you please open a JIRA issue talking about excessive logging and I'll try to consider this for 2.0. You may try to configure this specific class logger to be silent. As you can see, the map sizes are very different on the 2 servers when I will have expected hem to be pretty identicals... and it's the same on all the servers. all have different map size. Your stats look a bit strange to me. However I wouldn't care too much for them. Remember that the cache is not guaranteed to be consistent. JCS is a cache, not a key-value-store. So I'm wondering if the lateral cache is really used. I will say yes because I'm getting the exceptions when one server is going down, but I'm not seeing the benefits yet. Well, benefits should be there, even if its difficult to see them from the statistics. You would be able to see this on an application level, that is, if an item available in one cache actually saves the expensive get operation from the original source in another. This would need some debugging, I'm afraid. HTH Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Remote Cache Server Help
On 27.11.12 16:28, Drew Leamon wrote: I'm embarrassed! I just figured out the issue. My server was using 2.0.0-SNAPSHOT and my client was using 1.4.0. Sorry to waste your time. Not at all. Thanks for telling us. Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Remote Cache Server Help
On 12.11.12 16:28, Drew Leamon wrote: registry.host=localhost registry.port=1103 remote.cache.service.port=1103 Shouldn't these ports be different? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Mystery in Purgatory size
On 26.09.12 17:16, Chopin hu wrote: I set the Purgatory size to 1000 in the default region. I use file disk cache auxiliary (not indexed) so that I have one cache item per data (binary data file).I need to do periodic batch cache using JCS.If the cache items are less than 1000, everything works fine. if the cache items are more than 1000, to say 1010, then roughly about 10 random cache items would be lost. I'd not recommend the use of FileDiskCache. It has some strange file system dependencies. Always remember that JCS is a cache, not a key/value store. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] Performance of invalidating a group in LRUMemoryCache
On 20.06.12 23:51, Joseph A Calzaretta wrote: Are we doing something wrong? Is the behavior we're seeing intended or is it a bug? If it is by design, should it perhaps be documented somewhere that the performance of invalidateGroup is O(n) and not O(1)? Obviously, the feature was not implemented with your use-case in mind. Right now, JCS is just a map on steroids with some group support. You are, however, free to put maps of objects into your cache to implement what you want. Even better, submit a proposal for a patch to get this resolved via JIRA and we try to put it in (we prefer unified patches). Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [dbutils] Mapping from JPA annotations
On 19.01.12 21:37, Moandji Ezana wrote: Interesting. I've never used MyBatis, but U've read the docs and it didn't really seem to help write less SQL. Do you all only use DbUtils for smaller projects, then? I prefer Torque (db.apache.org/torque). Nice, fast and simple. And no SQL to write. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]--How to get a list of Keys in a region
On 17.01.12 03:35, Chopin hu wrote: Thank you so much, Thomas. Unfortunately, due to the customer requirements, the disk cache instead of indexed disk cache is what they want. is there any plan JCS will add this support to the disk cache? I think it is really useful to have it in Disk Cache, particularly for my project at Goddard NASA. First of all it would be necessary to define what a group means for the file disk cache (a directory perhaps?). Then implementation should be easy. You are welcome to contribute. But see below. By the way, do you know any timeline for JCS release 1.4? Not a time line, actually. However this will probably be version 2.0 supporting generics and using the org.apache.commons.jcs package name for all classes. IOW it *will* break the API, at least partly. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]--How to get a list of Keys in a region
On 16.01.12 18:06, Chopin hu wrote: java.lang.UnsupportedOperationException at org.apache.jcs.auxiliary.disk.file.FileDiskCache.getGroupKeys(FileDiskCache.java:143) at org.apache.jcs.engine.control.CompositeCache.getGroupKeys(CompositeCache.java:1110) at org.apache.jcs.access.GroupCacheAccess.getGroupKeys(GroupCacheAccess.java:192) at gov.nasa.gsfc.giovanni.TestCache.getKeyList(TestCache.java:167) at gov.nasa.gsfc.giovanni.TestCache.main(TestCache.java:608) What could be wrong? Well, the error message basically says it: Groups are not supported in the FileDiskCache. I'd recommend the IndexedDiskCache instead. It works far better. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS]--How to get a list of Keys in a region
On 13.01.12 15:59, Chopin hu wrote: Vijayakumar, Thanks for your response. The method cache.putInGroup() does not seem to really work in my case. I am working a simple commandline utility, which will extract all keys from a cache region. No key/value can be known in advance. Besides, I don't understand the concept of groupName yet in a cache region. It looks I don't have a group name either. But is this some method that I can trick it so that it can return all cache keys from a region? --- On Fri, 1/13/12, NM, Vijayakumar vijayakumar...@capgemini.com wrote: From: NM, Vijayakumar vijayakumar...@capgemini.com Subject: RE: [JCS]--How to get a list of Keys in a region To: Commons Users List user@commons.apache.org Date: Friday, January 13, 2012, 12:41 AM Hi, This may be of some help. JCS cache = JCS.getInstance(regionName); cache.putInGroup(key, groupName, value); Set keys = cache.getGroupKeys(groupName) This is the actual trick. Just invent some group name and put all your keys and values into that group. Then you can get a list of keys by calling getGroupKeys(). It would be more or less an additional wrapper in your region. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[JCS] Re: JCS Key Length Issue -- limited to 256 characters long?
First of all: Please use user@commons.apache.org for questions regarding JCS. On 04.01.12 18:12, Chopin hu wrote: I have a program to download files from remote sites. Once downloaded a data file, I use the URL as a key and put it to the cache so that I don't have to download it again if the url is found to exist in the cache. However, I found sometimes the caching would fail -- no caching is put to the file system ( I am using Disk File Cache). the url is working fine for downloading. After debugging, it turns out that the URL string is too long. When the url string exceeds 256 characters, JCS won't accept it as a proper key. So my questions are: 1.) is a JCS cache key limited to 256 chars long? is there a way to increase its length? 2.) If can not get around the cache key length limitation, what could be the possible ways to make a long URL string short enough but still unique enough to serve as a key? I tried to use the last 256 characters from the url string, but some query string is so long that it could not guarantee a key's uniqueness. I guess the FileDiskCache is the issue here. The key of the item in FileDiskCache is directly used as a file name. So what you experience is a limit of file name length rather than key length. You should better use another disk cache implementation such as IndexedDiskCache which does not have such limits. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Need Help on JCS Remote Cache
On 26.12.11 09:11, Narendra Verma wrote: Hi All, I have made setup of JCS in my Linux environment and trying to make a POC using Remote Cache. I cannot help you much with this problem. Just a hint that the users list for JCS changed to user@commons.apache.org. I redirected your message to there. Bye, Thomas. My System Setup: * RMI Server : Running on 10.55.164.215 (using RMI Start up Servlet) * Client-1: Running on box 10.55.164.215 on same machine where serer is running * Client-2: Running on box 10.55.164.45 My Configuration Files: * Server Configuration # -- # Registry used to register and provide the # IRemoteCacheService service. registry.host=10.55.164.215 registry.port=1102 # call back port to local caches. remote.cache.service.port=1102 # rmi socket factory timeout remote.cache.rmiSocketFactoryTimeoutMillis=5000 # cluster setting remote.cluster.LocalClusterConsistency=false remote.cluster.AllowClusterGet=false # -- # DEFAULT CACHE REGION jcs.default= jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.default.cacheattributes.MaxObjects=1000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache # PRE-DEFINED CACHE REGIONS jcs.region.userCache= jcs.region.userCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.region.userCache.cacheattributes.MaxObjects=1000 jcs.region.userCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache jcs.region.userCache.cacheattributes.UseMemoryShrinker=false jcs.region.userCache.cacheattributes.MaxMemoryIdleTimeSeconds=3600 jcs.region.userCache.cacheattributes.ShrinkerIntervalSeconds=60 jcs.region.userCache.cacheattributes.MaxSpoolPerRun=500 jcs.region.userCache.elementattributes=org.apache.jcs.engine.ElementAttributes jcs.region.userCache.elementattributes.IsEternal=false * Client-1 and Client-2 Configuration at separate boxes - See the above in System Setup Section # DEFAULT CACHE REGION # sets the default aux value for any non configured caches jcs.default=RC jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.default.cacheattributes.MaxObjects=1000 jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache jcs.default.elementattributes.IsEternal=false jcs.default.elementattributes.MaxLifeSeconds=3600 jcs.default.elementattributes.IdleTime=1800 jcs.default.elementattributes.IsSpool=true jcs.default.elementattributes.IsRemote=true jcs.default.elementattributes.IsLateral=false # CACHE REGIONS AVAILABLE # Regions preconfigured for caching jcs.region.userCache=RC jcs.region.userCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes jcs.region.userCache.cacheattributes.MaxObjects=1200 jcs.region.userCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache jcs.region.userCache.elementattributes.IsEternal=false jcs.region.userCache.elementattributes.MaxLifeSeconds=7200 jcs.region.userCache.elementattributes.IdleTime=1800 jcs.region.userCache.elementattributes.IsSpool=true jcs.region.userCache.elementattributes.IsRemote=true jcs.region.userCache.elementattributes.IsLateral=false # Remote RMI Cache set up to failover # This remote client does not receive jcs.auxiliary.RC=org.apache.jcs.auxiliary.remote.RemoteCacheFactory jcs.auxiliary.RC.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributes jcs.auxiliary.RC.attributes.FailoverServers=10.55.164.215:1102 jcs.auxiliary.RC.attributes.LocalPort=1202 jcs.auxiliary.RC.attributes.RemoveUponRemotePut=true jcs.auxiliary.RC.attributes.RmiSocketFactoryTimeoutMillis=5000 jcs.auxiliary.RC.attributes.GetOnly=false jcs.auxiliary.RC.attributes.Receive=true Client Test Programs: Input parameters while running client-1 : java com.brightsky.util.JCSTest /cache-client1.ccf Input parameters while running client-2 : java com.brightsky.util.JCSTest /cache.ccf-client1 package com.brightsky.util; import java.util.Date; /* * This code is property of BrightSky, Inc. Use, duplication and disclosure * in any form without permission of copyright holder is prohibited. * * (C) Copyright BrightSky, Inc. 2011. All rights reserved. */ /** * @author nverma * */ public class JCSTest { public static void main(String a[]) throws InterruptedException { System.out.println(\n ===\n ); System.out.println(\n === QA Node - +a[0]+ \n ); System.out.println(\n ===\n );
Re: [JCS] - Remote store recovery
On 20.12.11 08:57, NM, Vijayakumar wrote: Hi All, One of the JCS feature mentioned in the website is Remote store recovery, can somebody point me the documentation or example of how this is achieved. Thanks in advance. Maybe this? http://commons.apache.org/jcs/apidocs/org/apache/jcs/auxiliary/remote/RemoteCacheRestore.html Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: JCS LFU Implementation
Am 09.12.2011 22:06, schrieb Mir Tanvir Hossain: Hi, from the documentation it seems that JCS does support LFU. However, I could not find the LFU implementation on the JCS code. I might be missing something very obvious. Could anyone please point out the class on JCS that implements the LFU algorithm? I'd really appreciate that. Maybe this was meant? http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/experimental/org/apache/jcs/engine/memory/arc/ Bye, Thomas - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] the data becomes zero
On 15.09.11 07:27, NM, Vijayakumar wrote: Thanks for the reply, I have seen this problem many times, sometimes during server restart but most of the time it is during usage of JCS, for example I access data from JCS and next moment the entire cache file is empty and I don't get any data. Could I ask you for some more investigations? If the reset happens during normal operation, you should see a log message at warning level containing The file is corrupt. Do you see this? I modified the responsible class IndexedDisk recently to use NIO for the disk operations. Would you be able to test with the current trunk of JCS? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [JCS] the data becomes zero
On 14.09.11 15:31, NM, Vijayakumar wrote: We are using IndexedDiskCache, the size of the data file in disk is about 250MB, the problem is sometimes, the data gets erased from the disk (the data file size becomes zero) without any error message any where? Does this happen during normal use or only at restart? The restart mechanism is somewhat picky concerning problems in the file and tends to reset the data file then. Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[jcs] Re: Is there any method to save .key file other than dispose()/shutdown()
On 27.08.11 14:12, gurunath wrote: I am trying to use jcs indexeddiskcache in my web application. Here i need to save the cached data in disk whenever i change cached data, data file is updating but key dose't update untill we call dispose()/shutdown(). After calling dispose()/shutdown() i couldn't preform put()/get() operations. I tried with BlockDiskCache by specifying KeyPersistenceIntervalSeconds attribute but this one degrades performance if we keep less time. So I am looking for other methods to save .key file. Is there any other method? Please note that JCS moved to Apache Commons recently, so in the future please direct your JCS-related questions to user@commons.apache.org and mention [jcs] in the subject. On the subject: JCS doesn't provide this feature out of the box. You are, however, free to derive from IndexedDiskCache to expose the required functionality. This should be no big change. My question would be though, why you want to save the cache data on put. Are you sure that using a *cache* is the right thing to do for your application? Bye, Thomas. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org