Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 269 invoked from network); 13 Jan 2010 18:31:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2010 18:31:05 -0000 Received: (qmail 63911 invoked by uid 500); 13 Jan 2010 18:31:05 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 63848 invoked by uid 500); 13 Jan 2010 18:31:05 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 63838 invoked by uid 99); 13 Jan 2010 18:31:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2010 18:31:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.211 as permitted sender) Received: from [209.85.218.211] (HELO mail-bw0-f211.google.com) (209.85.218.211) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2010 18:30:55 +0000 Received: by bwz3 with SMTP id 3so18869368bwz.36 for ; Wed, 13 Jan 2010 10:30:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=V8VjTOMP+HauDs2sn1G4IMfIBQO2uK8QZhhXOZtnziw=; b=R0vF3dso4Aexcx+Dfi/R3nBa1cf9AERp0tMvRjzzN3XS0xPJF5OJNZSfdjFzGgddc+ x9VIPgKbKyYYiKD/7C4LrlAStiowNogNiFpeWWMOpp9lr7/HND985LChJ2QbKm9vC9cL pDqXfzMJhoswd4aMIM9ChS+8Yj49bxer6396U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=lyt+VcgSvdDSSyGPPUGGSD3KBjKJY11kzl7xIXlDj50suey6egW8SgTGDQ6C18S4Ba j8Ptctgh8wgHdtZfqKQzlUjlbCsMsi00rqxvijLoF6gxO+2Yluqj9MRsJg0hIAPcsX/g 0XVvTDGzeJXEnvjT6oqdEfQ5DIrdbEW/QWCbY= MIME-Version: 1.0 Received: by 10.204.34.10 with SMTP id j10mr3834279bkd.77.1263407433992; Wed, 13 Jan 2010 10:30:33 -0800 (PST) In-Reply-To: <27148797.post@talk.nabble.com> References: <27026756.post@talk.nabble.com> <4B43F916.20108@gmail.com> <5380c69c1001052112i74cd812di22c14f365b3587c7@mail.gmail.com> <5380c69c1001070552q1bb4fd47u6c24130e0c5ad53f@mail.gmail.com> <27081298.post@talk.nabble.com> <27136815.post@talk.nabble.com> <5380c69c1001122143q4113a4csa57f0aa781bb2ebf@mail.gmail.com> <27148797.post@talk.nabble.com> From: Claus Ibsen Date: Wed, 13 Jan 2010 19:30:13 +0100 Message-ID: <5380c69c1001131030g2830c7adg759e39f18586f9c7@mail.gmail.com> Subject: Re: camel-cache: Using Objects for cache To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jan 13, 2010 at 7:19 PM, tide08 wrote: > > Thanks Claus! ArtifactID says springsource is it some customized version = of > ehCache we are using? Reason I am asking is that I have conflict with > hibernate and I need to exclude ehCache dependency from either one of the= se. > Its the OSGi problem that it often cannot use maven jars out of the box. So SpringSource creates their own .jar that works in their OSGi server. IMHO that is a big pain with OSGi as you need to keep up to date with relea= ses. Many projects don't release their .jars as OSGi compliant bundles. It should be possible to use a never version and then let the camel feature for camel-cache use that Spring OSGi compliant .jar. Just that they are API compatible. > Also, I had another suggestion for cache component: > > - Clean up ehCache.xml to remove sample cache descriptions as these are > redundant, specially the one's which use distributed cache. It requires o= ne > of the port to be open and does not work out of the box. > Can you pin point the problem. > > > Claus Ibsen-2 wrote: >> >> On Wed, Jan 13, 2010 at 12:32 AM, tide08 wrote: >>> >>> Looks like Ashwin got on to this before I could submit mine. >>> >>> BTW..what version of ehCache does it use? It is not very clear from pom >>> (and >>> osgi is new to me) >>> >> >> Check the parent/pm.xml which have versions listed. >> >> Otherwise do a mvn dependency:list in the component to see which >> versions maven report. >> [INFO] >> net.sourceforge.ehcache:com.springsource.net.sf.ehcache:jar:1.6.2:compil= e >> >> >>> Thanks! >>> >>> >>> tide08 wrote: >>>> >>>> Thanks! I will reply back when patch is ready. >>>> >>>> >>>> >>>> Claus Ibsen-2 wrote: >>>>> >>>>> Hi >>>>> >>>>> I created a ticket for it >>>>> https://issues.apache.org/activemq/browse/CAMEL-2343 >>>>> >>>>> On Wed, Jan 6, 2010 at 6:12 AM, Claus Ibsen >>>>> wrote: >>>>>> On Wed, Jan 6, 2010 at 3:44 AM, Willem Jiang >>>>>> wrote: >>>>>>> I think we can support the InputStream and Serializable object at t= he >>>>>>> same >>>>>>> time :) >>>>>>> If the Message body is Serializable, we can skip the InputStream >>>>>>> part, >>>>>>> if >>>>>>> it's not, we can try to turn it into an InputStream. >>>>>>> >>>>>>> Any thought? >>>>>>> >>>>>> >>>>>> Yeah my thought as well about the Serializable >>>>>> >>>>>> >>>>>>> BTW, any kind of contribution is welcome, so please feel free to >>>>>>> submit >>>>>>> the >>>>>>> patch with a JIRA[1]. >>>>>>> >>>>>>> [1] http://issues.apache.org/activemq/browse/CAMEL >>>>>>> >>>>>>> Willem >>>>>>> >>>>>>> >>>>>>> tide08 wrote: >>>>>>>> >>>>>>>> I am using camel 2.1.0 cache component, and I am confused how I ca= n >>>>>>>> use >>>>>>>> custom objects with cache? >>>>>>>> >>>>>>>> It seems to me that for every object I would want to use, I will >>>>>>>> have >>>>>>>> to >>>>>>>> register TypeConverter for those classes? Is that assumption >>>>>>>> correct? >>>>>>>> I think it is due to following code in CacheProducer.java, which >>>>>>>> tries >>>>>>>> to >>>>>>>> convert payload into InputStream? >>>>>>>> >>>>>>>> InputStream is =3D >>>>>>>> exchange.getContext().getTypeConverter().convertTo(InputStream.cla= ss, >>>>>>>> body); >>>>>>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// Read InputStream into a byte[] b= uffer >>>>>>>> =A0 =A0 =A0 =A0byte[] buffer =3D new byte[is.available()]; >>>>>>>> =A0 =A0 =A0 =A0int n =3D is.available(); >>>>>>>> =A0 =A0 =A0 =A0for (int j =3D 0; j < n; j++) { >>>>>>>> =A0 =A0 =A0 =A0 =A0 =A0buffer[j] =3D (byte)is.read(); >>>>>>>> =A0 =A0 =A0 =A0} >>>>>>>> Looking at EHCache API, it can support any object as long as it is >>>>>>>> serializable, so camel-cache component should not try to convert >>>>>>>> payload >>>>>>>> into InputStream. Or was there any specific reason to do so? >>>>>>>> >>>>>>>> I quickly modified Producer and it seems to work fine, please let = me >>>>>>>> know >>>>>>>> and I would be happy to provide the patch. >>>>>>>> >>>>>>>> Thanks! >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Claus Ibsen >>>>>> Apache Camel Committer >>>>>> >>>>>> Author of Camel in Action: http://www.manning.com/ibsen/ >>>>>> Open Source Integration: http://fusesource.com >>>>>> Blog: http://davsclaus.blogspot.com/ >>>>>> Twitter: http://twitter.com/davsclaus >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Claus Ibsen >>>>> Apache Camel Committer >>>>> >>>>> Author of Camel in Action: http://www.manning.com/ibsen/ >>>>> Open Source Integration: http://fusesource.com >>>>> Blog: http://davsclaus.blogspot.com/ >>>>> Twitter: http://twitter.com/davsclaus >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/camel-cache%3A-Using-Objects-for-cache-tp27026756= p27136815.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: http://old.nabble.com/camel-cache%3A-Using-= Objects-for-cache-tp27026756p27148797.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus