hi leif,
sorry about the late reply.
i'm running jboss as a service. if any one of a number of exceptions occur
i would like to use custom code to notify all clients that the server will
restart in x minutes and then restart the service.
everett
At 10:13 AM Wednesday 3/31/2004, you wrote:
>Everett,
>Filters exist in the Wrapper code rather than in the JVM so classes can not be
>executed directly.
>It is not impossible however. I could conceivably send a message back to
>the JVM
>using the backend socket and then have the WrapperManager execute the required
>code.
>
>One option would be for you to do something like this yourself by
>overriding the
>System.out and System.err PrintStreams. Something like this:
>
>System.setOut( new FilterPrintStream( System.out ) );
>
>Your print stream would pass everything along to the original PrintStream
>but then
>also check for your trigger strings. This would not be able to trigger
>off of low
>level output like the Wrapper can. But it should work for most things.
>
>What exactly would you like to do that prompted you to request this feature?
>I may have some other ideas
>
>Cheers,
>Leif
>
>Everett Toews wrote:
>
>>hi leif,
>>
>>have you considered allowing users to create custom filter actions?
>>it might look something like:
>>
>>wrapper.filter.trigger.1=java.lang.OutOfMemoryError
>>wrapper.filter.action.1=com.mycompany.MyFilterAction
>>
>>where com.mycompany.MyFilterAction is a class in a jar in the
>>classpath specified by wrapper.java.classpath.<n>.
>>
>>i realize this is a potential security issue. if someone had access
>>to the app they could add triggers and execute arbitrary code against
>>anything else running in the jvm. but if access isn't an
>>issue is this feature a possibility?
>>
>>everett
|