Re: Newbie: connected user

From: Mike Kienenberger (mkienen..laska.net)
Date: Sat Jan 08 2005 - 17:49:14 EST

  • Next message: Andrus Adamchik: "Re: Newbie: connected user"

    Koka <22605..mail.com> wrote:
    > Sorry for this newbie question, but I already lost more time looking
    > for proper way to understand it than it took to download/install/set
    > up cayenne-tapestry-app example...
    >
    > What I need is to have a login page and make Cayenne use connection
    > credentials (username/ password) supplyed by the user at this login
    > page. So when and how can I customise cayenne initialization?

    That's a good question.

    Most Cayenne use cases I've had up to this point use database connections
    with predefined username/passwords.

    It sounds like you want a new database connection with unique
    username/password information with every web session.

    I think you would have to create a new DataNode for every user.
    And I think each DataNode has to be uniquely named.

    You could probably use DataNode.setDataSource() to provide a DataSource
    object with the proper username/password once you figured out how to build
    new unique DataNodes for each web session.

    Perhaps the creation of DataNodes can be done by calling
    DataDomain.addNode() for each one.

    That's my guess on where you'd start looking. Probably someone else can
    provide better information.

    However, I don't think what you're doing easily fits into what's considered
    "standard" cayenne use patterns.

    That might just mean that Cayenne needs to provide a new use pattern, though
    :)

    -Mike



    This archive was generated by hypermail 2.0.0 : Sat Jan 08 2005 - 17:49:18 EST