J2EE Security Design Question

Discussion in 'Java' started by Ryan Pape, Sep 12, 2003.

  1. Ryan Pape

    Ryan Pape Guest

    I have a J2EE app where there is a one-one correspondence between the
    JAAS user an an Entity bean (user EJB). As far as I know, there is no
    way to automatically bind the two together so retrieveing the entity
    bean associated with a user is done by something like,
    UserHome.findByPrimaryKey(name_from_principal).

    I have a stateful session bean, call it "Manager", that executes
    actions to underlying entity beans for a particular user.

    I have another entity bean, "file", which upon creation must be given
    a reference to a third entity bean that can be dervied by looking at
    the user entity bean I described above.

    So my question is, from a design & performance perspective:

    Is it better to, in ejbCreate methods for the file entity bean,
    perform the lookup to get a user entity bean from the security
    Principal each time

    or

    store a reference to the user entity bean in my stateful session bean
    and pass it as a parameter to the create() method on my file entity
    bean.

    Any opinions would be appreciated.
    Ryan Pape, Sep 12, 2003
    #1
    1. Advertising

  2. Ryan Pape

    Bryce (Work) Guest

    On 12 Sep 2003 10:47:02 -0700, (Ryan Pape) wrote:

    >I have a J2EE app where there is a one-one correspondence between the
    >JAAS user an an Entity bean (user EJB). As far as I know, there is no
    >way to automatically bind the two together so retrieveing the entity
    >bean associated with a user is done by something like,
    >UserHome.findByPrimaryKey(name_from_principal).


    What Application server are you using? JBoss has a Database Login
    Module...
    Bryce (Work), Sep 12, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ross M. Greenberg

    LAMP & J2EE as opposed to LAMP vs J2EE

    Ross M. Greenberg, Dec 12, 2004, in forum: Java
    Replies:
    6
    Views:
    1,373
    Robert kebernet Cooper
    Dec 24, 2004
  2. T.G.
    Replies:
    1
    Views:
    495
    Raymond DeCampo
    Jan 4, 2006
  3. Lian Liming

    J2EE security question

    Lian Liming, Jan 6, 2006, in forum: Java
    Replies:
    0
    Views:
    333
    Lian Liming
    Jan 6, 2006
  4. mehdi mousavi
    Replies:
    0
    Views:
    1,023
    mehdi mousavi
    Feb 15, 2009
  5. Rajive Narain
    Replies:
    0
    Views:
    1,314
    Rajive Narain
    Sep 18, 2009
Loading...

Share This Page