Re: Integration with Session Beans

From: David Solis (dsoli..egosoft.com.mx)
Date: Wed Nov 13 2002 - 17:20:16 EST

  • Next message: yadan: "Could you tell me how to use the InsertQuery class to insert recorde into database.Anxious!"

    Hi Andrus,
    I'm sorry I'm afraid my question wasn't specific.

    We developed a system based on a middleware and several presentation
    tiers (html, wap and web services). The middleware is based on services
    instead of data. We have several Session Beans to provide services to
    the presentation tier and each service could use Entity Beans to
    persistence.
    Because of development time, I want to use Cayenne instead of Entity
    Beans.

    I'm thinking in a Session Bean (stateless but could be stateful) as the
    façade to Cayenne data objects. I don't want to expose these data
    objects to the presentation tier. My main requirement is DataContext
    implements java.io.Serializable (already does) and my main question is
    how to manage transactions between Cayenne and a Session Bean?
    I'm newbie to Cayenne but I know very well Apple's EOF.

    Regards

    David

    > -----Original Message-----
    > From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    > Sent: Wednesday, November 13, 2002 3:27 PM
    > To: David Solis
    > Cc: cayenne-use..bjectstyle.org
    > Subject: Re: Integration with Session Beans
    >
    > Hi David,
    >
    > Originally we planned a full blown "integration" with EJB. When we
    started
    > looking closer, it turned out that the effort is not worse it,
    because:
    >
    > 1. EJB is on its way out of the market
    > 2. EJB is a bad solution for most programming problems.
    >
    > So as it goes with OpenSource, there was no personal "itch" to
    scratch, so
    > this was forgotten.
    >
    > Having said that, I totally realize that there are a lot of companies
    that
    > do use EJBs at the moment and developers need to solve the problems
    within
    > EJB framework. So we would welcome volunteer attempts to use Cayenne
    with
    > it
    > and would like to hear about other people experiences.
    >
    > As for the considerations - you may want to read that (from the times
    we
    > were looking at EJB):
    >
    > http://objectstyle.org/cayenne/lists/cayenne-devel/2002/05/0001.html
    >
    > Basically, the main problem is (just like with any other EJB app) -
    > synchronizing fine grained objects on the client (servlet/JSP/...)
    with a
    > bean on the EJB server.
    >
    > Please post the details of what exactly are you planning to use
    Cayenne
    > for
    > and how much access to persistent objects is required within a session
    > bean
    > and its client. Then I will be able to write a more detailed answer.
    >
    > Cheers
    > Andrus
    >
    >
    > David Solis writes:
    > > Are there special considerations to integrate Cayenne with Session
    > > Beans? Is there an example?
    > >
    > > TIA
    > >
    > > Regards,
    > >
    > > David
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 13 2002 - 17:21:56 EST