tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Couralet <cedric.coura...@gmail.com>
Subject Re: Question regarding JNDIRealm - tomcat 6.0.35
Date Wed, 20 Feb 2013 09:57:16 GMT
2013/2/19 Tanmoy Chatterjee <Tanmoy.Chatterjee@nxp.com>:
> Hello,
> Technical Stack: Apache Tomcat v 6.0.35
> OS : RHEL 5.3 64 bits
> java version "1.6.0_18" 32 bits
>
> I am using Realm className="org.apache.catalina.realm.JNDIRealm" for connecting to LDAP.
>
> Is there any configuration to prevent the default connection to LDAP happening on Tomcat-Start.
> If I have to write my own code for doing this which method should I be overriding?
>

Hello,

By pure curiosity, why would you want that?

The validation happens in the start method of JNDIRealm :
// Validate that we can open our connection
        try {
            open();
        } catch (NamingException e) {
            throw new LifecycleException(sm.getString("jndiRealm.open"), e);
        }

My first attempt was to override this method in a custom Class which
inherits from JNDIRealm. This obviously can't work short of rewriting
the complete call to super.start().

Or, but I didn't test nor do i know if it is good (or even valid)
java, you could try by overriding this method like that :

@Override
    public void start() throws LifecycleException {
         ((RealmBase)this).start();

    }

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message