From: Christian M. <vc...@cl...> - 2002-08-09 13:30:44
|
----- Original Message ----- From: "Urberg, John" <ju...@ve...> To: <Gavin_King/Cirrus%CI...@ci...> Cc: <hib...@li...> Sent: Friday, August 09, 2002 3:13 PM Subject: RE: FW: [Hibernate-devel] Getting Collections to pull data from the cache > >>And I would expect 3 SQL statements with all the many-to-ones and > >>collections should get resolved from the cache. > > > >To enable caching, you need to add > > > ><jcs-cache usage="read-write"/> you can of course use usage='read-only' isnt it ? > > > >to all <class>, <set>, <map>, <list>, <array>, <primitive-array> elements > >that you want to cache. > > Ahh, I thought that was optional. That would explain it. I am wondering something here: If we got this simple one to many: <set role="bars" table="foobars"> <key column="foo_id"/> <one-to-many class="com.illflow.Bar"/> </set> i have declarated the class bar and the class foo to use jcs-cache, shoudnt the collection of bar in the class foo cached automatically ? If i have to specify that the collection need to be cached, will it use the same JCS region as the com.illflow.Bar ? > > So I tried it out and got the following warning: > > WARNING: Could not instantiate cache - probably the JCS jar is > missing:... > > Then I looked at the JCS web site to see what the dependencies are and found > the following: > > commons-configuration 1.0-dev commons-configuration-1.0-dev.jar > commons-logging 1.0 commons-logging-1.0.jar > commons-lang 1.0-dev commons-lang-1.0-dev.jar > concurrent 1.0 concurrent-1.0.jar > hsqldb 1.7.0 hsqldb-1.7.0.jar > log4j 1.1.3 log4j-1.1.3.jar > servletapi 2.2 servletapi-2.2.jar > javagroups 2.0 javagroups-2.0.jar > jisp 1.0.2 jisp-1.0.2.jar > tomcat-util 3.2.1 tomcat-util-3.2.1.jar > velocity 1.3-dev velocity-1.3-dev.jar > xmlrpc 1.1 xmlrpc-1.1.jar > stratum 1.0-b2-dev stratum-1.0-b2-dev.jar > > Anyone know where I can find all these in one spot? (I can't find > commons-configuration anywhere) Maybe it's time to build a third party jar > file so folks (like me for example) don't have to track all this stuff down > seperately. Hibernate got everything you need to run JCS, are you sure you put the cache.ccf in the classpath, it's more likely the issue here. Regards Christian Meunier |