RE: Managed Bean Question

2002-11-22 Thread Anthony Mutiso 2
Thanks

Bill, that worked better!

-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]]
Sent: November 21, 2002 2:31 AM
To: [EMAIL PROTECTED]
Subject: Re: Managed Bean Question


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 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Managed Bean Question

2002-11-21 Thread Bill Barker
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 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]