You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anthony Mutiso 2 <an...@utilitynet.net> on 2002/11/20 17:20:43 UTC
Managed Bean Question
I have a webapp with a custom realm class.
The webapp worked fine in TC 4.0.5.
When I migrate my webapp to 4.1.12 I get Managed Bean errors which fail my
realm initialization.
On searching the mail-list I found suggestions that I need to register the
realm class in the mbeans-discriptors.xml file.
My qustions is, is this the only or right way to address this issues?
It feels somewhat dirty to update a file in the catalina.jar file.
Thanks
Anthony
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Managed Bean Question
Posted by Bill Barker <wb...@wilshire.com>.
Fortunately, there is a yet-undocumented-method :( that works much better.
The "ServerLifecycleListener" in the "server.xml" file takes an
(undocumented) attribute called 'descriptors'. The value is a ';' separated
list of resources to load the mbean-descriptors from. This allows you to
package your mbeans-descriptors.xml file with the jar that contains the
custom Realm. You just create your own mbeans-descriptors.xml file with
your Realm, and in "server.xml" set:
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
descriptors="/net/utilitiynet/my/package/mbean-descriptors.xml"
debug="0"/>
and all of your custom classes will be registered. It works great for me.
"Anthony Mutiso 2" <an...@utilitynet.net> wrote in message
news:D9F835E5D501A540BBEDEC74CBF151100A7269@MERCURY.Utilitynet.net...
> I have a webapp with a custom realm class.
> The webapp worked fine in TC 4.0.5.
> When I migrate my webapp to 4.1.12 I get Managed Bean errors which fail my
> realm initialization.
> On searching the mail-list I found suggestions that I need to register the
> realm class in the mbeans-discriptors.xml file.
>
> My qustions is, is this the only or right way to address this issues?
>
> It feels somewhat dirty to update a file in the catalina.jar file.
>
> Thanks
>
> Anthony
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>