jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smuts, Aaron" <Aaron.Sm...@travelocity.com>
Subject RE: cache.ccf resolution via classpath?
Date Wed, 31 Aug 2005 19:35:10 GMT
Hmmn

You can always load it yourself and call config on the cacheManger with
a Properties object.  You don't have to modify the code to do that.

> -----Original Message-----
> From: Tim Cronin [mailto:tcronin@interwoven.com]
> Sent: Wednesday, August 31, 2005 12:27 PM
> To: JCS Users List
> Subject: RE: cache.ccf resolution via classpath?
> 
> It's still the same.
> 
> I got the latest code from the svn repos and CompositeCacheManager
> Hasn't changed.
> 
> InputStream is = getClass().getResourceAsStream( propFile );
> 
> -----Original Message-----
> From: Smuts, Aaron [mailto:Aaron.Smuts@travelocity.com]
> Sent: Wednesday, August 31, 2005 10:29 AM
> To: JCS Users List
> Subject: RE: cache.ccf resolution via classpath?
> 
> http://svn.apache.org/repos/asf/jakarta/jcs/trunk/tempbuild/
> 
> 
> > -----Original Message-----
> > From: Tim Cronin [mailto:tcronin@interwoven.com]
> > Sent: Wednesday, August 31, 2005 11:26 AM
> > To: JCS Users List
> > Subject: RE: cache.ccf resolution via classpath?
> >
> > When will that be out.
> >
> > Is there a way to get the nightly build?
> >
> > -----Original Message-----
> > From: Smuts, Aaron [mailto:Aaron.Smuts@travelocity.com]
> > Sent: Tuesday, August 30, 2005 4:58 PM
> > To: JCS Users List
> > Subject: RE: cache.ccf resolution via classpath?
> >
> > The change to use the thread's classloader should be in the 1.2.6.7
> > release.
> >
> > I've never had any problems running tests in eclipse after the
> cache.ccf
> > file gets copied to the target directory.
> >
> > Aaron
> >
> > > -----Original Message-----
> > > From: Tim Cronin [mailto:tcronin@interwoven.com]
> > > Sent: Tuesday, August 30, 2005 5:44 PM
> > > To: jcs-users@jakarta.apache.org
> > > Subject: cache.ccf resolution via classpath?
> > >
> > > I'm trying to write a simple command line example of jcs.
> > >
> > >
> > >
> > > Debugging in Eclipse I'm getting an NPE when trying to load the
> cache
> > > props file.
> > >
> > >
> > >
> > > In digging in the code I found that the file is being resolved in
> > > CompositeCacheManager
> > >
> > >
> > >
> > > By calling        InputStream is = getClass().getResourceAsStream(
> > > propFile ); (line 165)
> > >
> > >
> > >
> > > I did a simple test with the following code
> > >
> > >
> > >
> > >       ClassLoader c =
CompositeCacheManager.class.getClassLoader();
> > >
> > >       while (c != null)
> > >
> > >       {
> > >
> > >         System.err.println(c.getClass().getName());
> > >
> > >
> > >
> > >         c = c.getParent();
> > >
> > >       }
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
System.err.println(CompositeCacheManager.class.getResource("cache.ccf"))
> > > ;
> > >
> > >
> > >
> >
>
System.err.println(Thread.currentThread().getContextClassLoader().getRes
> > > ource("cache.ccf"));
> > >
> > >
> > >
> > > The output yielded was
> > >
> > >
> > >
> > > sun.misc.Launcher$AppClassLoader
> > >
> > > sun.misc.Launcher$ExtClassLoader
> > >
> > > null
> > >
> > > file:/C:/src/projects/workarea/jcs/classes/cache.ccf
> > >
> > >
> > >
> > > I change the above line CompositeCacheManager to use the current
> > thread
> > > call and things
> > >
> > > Seemed to work is there something I'm doing wrong?
> > >
> > >
> > >
> > > It would be nice if the path might be left up the user.
> > >
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jcs-users-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message