Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 82365 invoked from network); 30 Mar 2011 02:56:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Mar 2011 02:56:07 -0000 Received: (qmail 55407 invoked by uid 500); 30 Mar 2011 02:56:06 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 55374 invoked by uid 500); 30 Mar 2011 02:56:06 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 55366 invoked by uid 99); 30 Mar 2011 02:56:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 02:56:06 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.218.46 as permitted sender) Received: from [209.85.218.46] (HELO mail-yi0-f46.google.com) (209.85.218.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 02:56:02 +0000 Received: by yia27 with SMTP id 27so462994yia.33 for ; Tue, 29 Mar 2011 19:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=+Et0bkNp+Ir0/8RcbcdDMq9y8nt4cg7azfNxHTMswX8=; b=csGixr+544YgTxMr6VcoxPIeIQOMvETwjyHbtf8b94M36GdIPwKx+2pveb9dqO+LfE YZQPJ2fw45izve9u4VaN0i26gbb0r1grIVcxAD+BqkwAT/7+ls+BDIJlVxa5a1Bv0Sm7 fqbK65DggNZDFcBcBZHJ2M3j2kg/i8s8qvJwg= 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; b=opV2X6SWQ/gQAW+KnPAlz3WuUxcXVUoQ/xtenYFCiPF74ImFl33+421Cw9c/5sZKkE Adxuz3lxtLh4htisqXIkEMSFFsW9GzqrMjpvN4jX3Vsuquu/j99B9HcT6qkuIe3ukXrl epygv3HwE4BqXZ7EbNYtmAsUsnzPdaZ9J0QjY= Received: by 10.91.32.36 with SMTP id k36mr104471agj.176.1301453741166; Tue, 29 Mar 2011 19:55:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.80.1 with HTTP; Tue, 29 Mar 2011 19:55:21 -0700 (PDT) In-Reply-To: <9E3A9D23-7DC8-4819-8060-1C67CB07B6AC@oracle.com> References: <1301435466265-6221096.post@n2.nabble.com> <9E3A9D23-7DC8-4819-8060-1C67CB07B6AC@oracle.com> From: Michael Dick Date: Tue, 29 Mar 2011 21:55:21 -0500 Message-ID: Subject: Re: About DataCache and RemoteCommitProvider in application server context. To: dev@openjpa.apache.org Content-Type: multipart/alternative; boundary=001485f90f98ef10fc049faa4fa9 --001485f90f98ef10fc049faa4fa9 Content-Type: text/plain; charset=ISO-8859-1 If you used the JMS provider you could configure a separate topic for each PU, or with the TCP provider use a different port. There would be some more set up to be done (e.g. configuring JMS) but is should isolate the events. You can't avoid the RemoteCommitProvider entirely - it's required when using a DataCache (it'll throw an exception when you create an EMF). The documentation is a little light, but having each EMF listen to a different topic / port should get you started down the right path. -mike On Tue, Mar 29, 2011 at 9:25 PM, Ravi Palacherla wrote: > Thanks Mike. > > So, if I use JMS RemoteCommitProvider and not configure it properly then > the events will not be fired ? > Can I completely avoid using Remote commit provider ? > Will it have any effect on datacache ? > > I believe I can avoid RemoteCommitProviders and still use datacache with > out any issues, correct ? > > I am using JPA1.0 hence any JPA2.0 solutions wont work. > > Regards, > Ravi. > > On Mar 29, 2011, at 8:15 PM, Michael Dick wrote: > > > Short answer: you might have to use the JMS or TCP RemoteCommitProviders > if > > you don't want the events to be fired. > > > > Long answer: The SJVM RemoteCommitProvider uses a static HashSet to keep > > track of all of it's instances and broadcasts events to all of them. > There's > > no filtering built in. You could write a RemoteCommitProvider that was > aware > > of the list of persistent types though, but that function isn't available > > right now. > > > > It might also work to configure the cache to only accept certain entities > > via configuration options, JPA 2.0 annotations, or the > PartitionedDataCache > > (since OpenJPA 2.0.0). > > > > Hope this helps, > > -mike > > > > On Tue, Mar 29, 2011 at 4:51 PM, Ravi P Palacherla < > > ravi.palacherla@oracle.com> wrote: > > > >> Hi , > >> > >> I have two different EJBs each has its own persistence units > >> (persistence.xml) and deployed as two different applications. Both have > >> DataCache enabled and RemoteCommitProvider set to sjvm. > >> Committing EntityA in EJBA results in broadcasting this event to event > >> manager in EJBB. > >> As EntityA is not present in EJBB, it results in ClassNotFoundException > of > >> EntityA. > >> > >> How can I avoid events (commits) for entities in EJBA to be broadcasted > to > >> event manager in EJBB ? > >> > >> Regards, > >> Ravi. > >> > >> -- > >> View this message in context: > >> > http://openjpa.208410.n2.nabble.com/About-DataCache-and-RemoteCommitProvider-in-application-server-context-tp6221096p6221096.html > >> Sent from the OpenJPA Developers mailing list archive at Nabble.com. > >> > > --001485f90f98ef10fc049faa4fa9--