Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 47193 invoked from network); 23 Sep 2010 08:30:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Sep 2010 08:30:11 -0000 Received: (qmail 43124 invoked by uid 500); 23 Sep 2010 08:30:11 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 42958 invoked by uid 500); 23 Sep 2010 08:30:08 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 42950 invoked by uid 99); 23 Sep 2010 08:30:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 08:30:08 +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: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Sep 2010 08:30:02 +0000 Received: (qmail 20872 invoked from network); 23 Sep 2010 08:29:41 -0000 Received: from unknown (HELO ?IPv6:::1?) (127.0.0.1) by localhost with SMTP; 23 Sep 2010 08:29:41 -0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1081) Subject: Re: Child Contexts From: Andrus Adamchik In-Reply-To: <001501cb5af8$a17e0150$e47a03f0$@pt> Date: Thu, 23 Sep 2010 11:29:40 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <32C07AC5-D5E7-41BA-9CD2-E0DE542F82B0@objectstyle.org> References: <55558.95.93.134.16.1285093356.squirrel@webmail.holos.pt> <54326.95.93.134.16.1285095835.squirrel@webmail.holos.pt> <38703.95.93.134.16.1285103249.squirrel@webmail.holos.pt> <51704.95.93.134.16.1285111057.squirrel@webmail.holos.pt> <77D3677D-75CC-40B7-866C-960F51316973@objectstyle.org> <001501cb5af8$a17e0150$e47a03f0$@pt> To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1081) Yes.=20 On Sep 23, 2010, at 11:23 AM, Bruno Ren=E9 Santos wrote: > My main problem was that I was having too many connections problems = because each > portlet has its own DataContext which will have its own connection = pool. So what > you saying is that I only need to configure a JNDI source for all = portlets so > that all of them share a connection pool? >=20 > Bruno >=20 > -----Mensagem original----- > De: Andrus Adamchik [mailto:andrus@objectstyle.org]=20 > Enviada: quinta-feira, 23 de Setembro de 2010 08:45 > Para: user@cayenne.apache.org > Assunto: Re: Child Contexts >=20 > Haven't read the earlier messages. So you are using nested contexts = already. In > this case a switch from the nested contexts to ROP will probably be = less > noticeable performance-wise (communication between child and parent = layers will > still be somewhat slower). Still extra unneeded complexity, so = figuring out the > DataSource mapping is a better idea. >=20 > Andrus >=20 >=20 > On Sep 23, 2010, at 10:37 AM, Andrus Adamchik wrote: >=20 >>=20 >> On Sep 22, 2010, at 2:17 AM, brd@holos.pt wrote: >>=20 >>> Can I use a Cayenne client on each portlet and create a cayenne = server on a >>> servlet to receive their requests? this way all database = communication is >>> done by the servlet and not by all portlets. >>=20 >> This is possible, but it will add not insignificant performance = overhead (a > second object layer plus communication between server and client = layers), so if > portlets and servlets are within the same webapp, I'd suggest you to = investigate > creating a connection pool in your container, and mapping it via JNDI = in > Cayenne: >>=20 >> http://cayenne.apache.org/doc30/using-jndi.html >>=20 >> Andrus >>=20 >>=20 >=20 >=20 >=20