Skip to Content
avatar image
Former Member

jndi look up for security


I have written a custom login module.(using AbstarctLoginModule)

In its login() method I want to check the user against an active userstore.

To do this I need to look up the securitycontext to get to the userstore.

I tried doing a lookup on "security". This is returning a value of null.

any idea why? Is this because the securitycontext is a non serializable object.

Do I need to use RemoteLoginContext?

please help.

thanks a lot

Padmaja Ragavendra

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 30, 2004 at 06:01 PM


    I was able to do a jndi lookup on the client side using the remote login api's.

    But on the server side I am not able to do a lookup of the security service or the context.

    I am getting a class cast exception.

    In the session bean I did a jndi.lookup(security)

    which I think gives the security service

    so should be able to cast it to the RemoteServiceReference

    When I cast it to that it gives a class cast exception.

    Any idea how I should get a securitycontext object on the server side I need it to do authorization.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      When you lookup "remotesecurity" from an application you should do the following:

      1. add in the initial context properties domain=true.

      2. add a refference from the application to security.sda

      3. add a reference from the application to security_api.sda