From users-return-21457-apmail-tomee-users-archive=tomee.apache.org@tomee.apache.org Fri Sep 4 17:30:11 2015 Return-Path: X-Original-To: apmail-tomee-users-archive@www.apache.org Delivered-To: apmail-tomee-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1750E18EBD for ; Fri, 4 Sep 2015 17:30:11 +0000 (UTC) Received: (qmail 14267 invoked by uid 500); 4 Sep 2015 17:30:10 -0000 Delivered-To: apmail-tomee-users-archive@tomee.apache.org Received: (qmail 14240 invoked by uid 500); 4 Sep 2015 17:30:10 -0000 Mailing-List: contact users-help@tomee.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tomee.apache.org Delivered-To: mailing list users@tomee.apache.org Received: (qmail 14228 invoked by uid 99); 4 Sep 2015 17:30:10 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 17:30:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 17161C0867 for ; Fri, 4 Sep 2015 17:30:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.214 X-Spam-Level: **** X-Spam-Status: No, score=4.214 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id z0DSFiAL-Xjp for ; Fri, 4 Sep 2015 17:29:57 +0000 (UTC) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id E0E3321342 for ; Fri, 4 Sep 2015 17:29:56 +0000 (UTC) Received: by obbbh8 with SMTP id bh8so22414501obb.0 for ; Fri, 04 Sep 2015 10:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aJbpl0HvuVDyJMuN/8fsPAsFk8lspxKqBAo5gW37uu8=; b=PjXLBFDZd597JZDAISD5LDwxo9rNsHRqaDAQIz5tDrxuPtbNF8SWxy+RCEg2WT6e0D D9hr3+s+DxzgBR7KTCnhphatPfwEeJTAjgNjNCZV8AFYMK37Byh2mY2TFrqqNonIP5sB I3DL24UmTKPBN1OZhTbVOIzcve78E7QEJjTwyeATDVw43G82m8/OP8eOM34nXOF5Ezcf Qm7llowbiaNQuoyBtnvRU0MVs7Cm3Jt0XOeR1d+B1VZAANaF948gx4jDCeg6g6h+R6c/ 10pczslHW3ehCguOLpG/MCn5D7oXvCumXqgLEJJRSjKmgn1TgcGYNvUPKxLrqOrBIa64 Wp2Q== MIME-Version: 1.0 X-Received: by 10.182.96.100 with SMTP id dr4mr4553095obb.49.1441387796350; Fri, 04 Sep 2015 10:29:56 -0700 (PDT) Received: by 10.76.33.198 with HTTP; Fri, 4 Sep 2015 10:29:56 -0700 (PDT) In-Reply-To: References: <1441331540522-4676111.post@n4.nabble.com> Date: Fri, 4 Sep 2015 13:29:56 -0400 Message-ID: Subject: Re: commons-jcs-jcach getCacheNames not working From: Steve Goldsmith To: users@tomee.apache.org Content-Type: multipart/alternative; boundary=001a11c3356095cbb3051eef3f11 --001a11c3356095cbb3051eef3f11 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So if I specify jcache.ccf in classpath, then technically it should show up via getCacheNames? It doesn't appear to pick it up from src/main/resources/jcache.ccf. On Fri, Sep 4, 2015 at 1:17 PM, Romain Manni-Bucau wrote: > Think it does but maybe it takes another one. About getCacheNames it is > only *created* caches ie the one jcache saw and not the ones jcs has. > Le 4 sept. 2015 19:14, "Steve Goldsmith" a =C3=A9crit = : > > > Looking at org.apache.commons.jcs.jcache.JCSCachingProvider it doesn't > > appear to search classpath? Do you have to explicitly specify path in > > getCacheManager call? > > > > On Fri, Sep 4, 2015 at 2:40 AM, Romain Manni-Bucau < > rmannibucau@gmail.com> > > wrote: > > > > > Hi, > > > > > > final CachingProvider cachingProvider =3D Caching.getCachingProvider(= ); > > > final CacheManager cacheManager =3D cachingProvider.getCacheManager()= ; > > > cacheManager.createCache("c1", new MutableConfiguration > String>()); > > > cacheManager.createCache("c2", new MutableConfiguration > String>()); > > > final Collection actualNames =3D new ArrayList(2); > > > for (final String s : cacheManager.getCacheNames()) > > > { > > > actualNames.add(s); > > > } > > > assertEquals(2, actualNames.size()); > > > assertEquals(new HashSet(asList("c1", "c2")), new > > > HashSet(actualNames)); > > > cachingProvider.close(); > > > > > > works fine so you have a setup issue somewhere - or you dont use the > > > same cache manager. > > > > > > > > > > > > Romain Manni-Bucau > > > @rmannibucau | Blog > > > | Github < > > > https://github.com/rmannibucau> | > > > LinkedIn | Tomitriber > > > > > > > > > 2015-09-04 3:52 GMT+02:00 sgjava : > > > > > > > getCacheManager().getCacheNames() is not working with JCS. I get an > > empty > > > > org.apache.commons.jcs.jcache.ImmutableIterable. The Ehcache provid= er > > > > correctly returns a String iterator with the cache names. My tests > run > > > > fine, > > > > but this is a good way to check that your configuration is picked u= p > > with > > > > multiple caches defined. > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > > > > > http://tomee-openejb.979440.n4.nabble.com/commons-jcs-jcach-getCacheNames= -not-working-tp4676111.html > > > > Sent from the TomEE Users mailing list archive at Nabble.com. > > > > > > > > > > > > > > > -- > > Steven P. Goldsmith > > > --=20 Steven P. Goldsmith --001a11c3356095cbb3051eef3f11--