geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carver <carver...@gmail.com>
Subject JAASRealm configuration problem
Date Mon, 24 Sep 2007 13:00:06 GMT

Hi

I want to define a custom JAASRealm in geronimo tomcat module and get this
realm via org.apache.catalina.Container.getRealm() or
org.apache.catalina.Context.getRealm().

Here is the custom realm definition:
  <gbean name="TomcatEngine" class="org.apache.geronimo.tomcat.EngineGBean">
    <attribute
name="className">org.apache.geronimo.tomcat.TomcatEngine</attribute>
    <attribute name="initParams">name=Geronimo</attribute>
    <reference name="DefaultHost">
      <name>TomcatHost</name>
    </reference>
    <references name="Hosts">
      <pattern>
        <type>Host</type>
      </pattern>
    </references>
    <reference name="RealmGBean">
      <name>TomcatJAASRealm</name>
    </reference>
    <reference name="TomcatValveChain">
      <name>FirstValve</name>
    </reference>
    <dependency>
      <name>TomcatResources</name>
    </dependency>
  </gbean>

  <gbean name="TomcatJAASRealm"
class="org.apache.geronimo.tomcat.RealmGBean">
    <attribute
name="className">org.josso.tc55.agent.jaas.CatalinaJAASRealm</attribute>
    <attribute name="initParams">
      userClassNames=org.josso.gateway.identity.service.BaseUserImpl
      roleClassNames=org.josso.gateway.identity.service.BaseRoleImpl
      debug=1
    </attribute>
  </gbean>

Then, I redeploy the tomcat module, and use the following API to retrieve
the custom realm:
org.apache.catalina.Realm realm = org.apache.catalina.Container.getRealm();

But, the realm instance is
org.apache.geronimo.tomcat.realm.TomcatGeronimoRealm, not the
org.josso.tc55.agent.jaas.CatalinaJAASRealm.

What's the problem?

thanks,
carver

-- 
View this message in context: http://www.nabble.com/JAASRealm-configuration-problem-tf4509058s134.html#a12859457
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message