Yes, it is because dual EHCaches.

We don't use disk persistence, so we haven't modified the diskStore
attribute in ehcache.xml.
So starting the next CacheManager instance causes a collision on this.

I also want to avoid having duplicate config files for EHCache, so I wrote a
custom CacheContentImpl which uses the already existing CacheManager. I
swapped it by means of Tapestry's service override mechanism. Works like a
charm!

Olle




2009/9/17 Ben Gidley <b...@gidley.co.uk>

> Hi,
> Is the error your getting complaining about 2 ehcaches? We have this in one
> of our apps and it all works fine - so I am puzzled you are getting this
> error.
>
> Ben Gidley
>
> www.gidley.co.uk
> b...@gidley.co.uk
>
>
> On Thu, Sep 17, 2009 at 2:15 PM, Olle Hallin <olle.hal...@hit.se> wrote:
>
> > Hi!
> >
> > I just made an attempt to introduce the Ioko tapestry-caching library in
> > our
> > project, but stumbled on the fact that we already use EhCache. (We use
> > tapestry-cache 1.5.0)
> >
> > (Manifested as an exception from ContentCacheImpl.<init> when it tries to
> > create the CacheManager instance.)
> >
> > I then tried to build my own version of the ContentCache service, hoping
> > that it would replace the one in the Ioko CacheModule. But Tapestry then
> > complains that there is more than one implementation of that interface.
> >
> > I then tried to decorate the ContentCache service built by CacheModule,
> but
> > that does not prevent the original service from being started.
> >
> > For us it would be valuable with some mechanism where one can inject an
> > already running
> > CacheManager into the Ioko ContentCacheImpl.
> >
> > Another feasible solution would be to provide our own implementation, and
> > *prevent* the Ioko instance to start. Is it possible to prevent builder
> > methods in other modules from being executed?
> >
> > Any ideas?
> >
> > Olle Hallin
> > Senior Java Developer and Architect
> > olle.hal...@crisp.se
> > www.crisp.se
> >
> >
> >
> >
> > 2009/8/6 Otho <taa...@googlemail.com>
> >
> > > There are some typos on
> > > http://tapestry.formos.com/projects/ioko-tapestry-commons/ . In all
> > > dependencies the starting slash of the closing </artifactId> is
> missing.
> > >
> > >
> > > 2009/8/5 Inge Solvoll <inge.tapes...@gmail.com>
> > >
> > > > Excellent. I love the convenient javascript and jquery jars!
> > > >
> > > > On Tue, Aug 4, 2009 at 3:04 PM, Ben Gidley <b...@gidley.co.uk> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > ioko-tapestry-commons 1.4.0 has been released. This is a bug fix
> > > release
> > > > to
> > > > > address issues in including the libraries.
> > > > >
> > > > > Full details and downloads are available at
> > > > > http://tapestry.formos.com/projects/ioko-tapestry-commons/
> > > > >
> > > > > Ben Gidley
> > > > >
> > > > > www.gidley.co.uk
> > > > > b...@gidley.co.uk
> > > > >
> > > >
> > >
> >
>

Reply via email to