Hi Juan Pablo, Maybe keep the configuration it as a static field of a @ConfigurableComponent ?
Note that it'll work only if you have one config. Stripes config allows to do lots of fancy stuff that I personally never used, but who knows, that door is open :P Cheers Rémi 2016-07-28 14:27 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi, > > we're currently developing some MBeans for some administrative tasks and > we would like to expose all registered ActionBeans URLs through JMX. > Obtaining them is easy, if you have a request routed through StripesFilter: > > Map< String, Object > stripesUrlBindings() { > final Map< String, Object > stripesUrlBindings = new HashMap<>(); > if( StripesFilter.getConfiguration() != null && > StripesFilter.getConfiguration().getActionResolver() instanceof > AnnotatedClassActionResolver ) { > final AnnotatedClassActionResolver acar = ( > AnnotatedClassActionResolver > )StripesFilter.getConfiguration().getActionResolver(); > final Map< String, Class< ? extends ActionBean > > > stripesOriginalUrlBindings = acar.getUrlBindingFactory().getPathMap(); > for( final Map.Entry< String, Class< ? extends ActionBean > > > entry : stripesOriginalUrlBindings.entrySet() ) { > final Map< String, String > map = new LinkedHashMap<>(); > map.put( "actionbean", entry.getValue().getCanonicalName() > ); > stripesUrlBindings.put( "{[" + entry.getKey() + > "],methods=[*]}", map ); > } > } > return stripesUrlBindings; > } > > However, a JMX call is not going to be routed through the StripesFilter so > StripesFilter.getConfiguration() yields null, and an error stating that the > request hasn't been routed through Stripes is logged. > > any ideas on how to proceed? > > > thanks in advance, > juan pablo > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > >
------------------------------------------------------------------------------
_______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users