RE: Child Contexts

From: Bruno René Santos (brunoren..olos.pt)
Date: Thu Sep 23 2010 - 08:23:41 UTC

  • Next message: Andrus Adamchik: "Re: Child Contexts"

    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?

    Bruno

    -----Mensagem original-----
    De: Andrus Adamchik [mailto:andru..bjectstyle.org]
    Enviada: quinta-feira, 23 de Setembro de 2010 08:45
    Para: use..ayenne.apache.org
    Assunto: Re: Child Contexts

    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.

    Andrus

    On Sep 23, 2010, at 10:37 AM, Andrus Adamchik wrote:

    >
    > On Sep 22, 2010, at 2:17 AM, br..olos.pt wrote:
    >
    >> 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.
    >
    > 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:
    >
    > http://cayenne.apache.org/doc30/using-jndi.html
    >
    > Andrus
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Sep 23 2010 - 08:24:13 UTC