On Wed, Apr 25, 2012 at 8:03 PM, <dm...@gmx.de> wrote: > Hello, > > With Camel 2.9.2, how can I configure a route using a ShiroSecurityPolicy in > Spring XML like the following Java sample? I have noticed a policy XML > element, but this seems to do something else. > > List<Permission> permissionsList = new ArrayList<Permission>(); > Permission permission = new WildcardPermission("dummy:*"); > permissionsList.add(permission); > > ShiroSecurityPolicy shiroSecurityPolicy = new > ShiroSecurityPolicy("classpath:dummy.ini", passPhrase, true, permissionsList); > > from("mock:dummy").policy(shiroSecurityPolicy)... > > Thanks, Dominik > -- > Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir > belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
You would need to use the Spring <bean> style for that. To setup the list of permissions. And then you can create a bean. Something alike: <bean id="shiroPolicy" class="..."> <constructor-arg index="0" value="..."/> <constructor-arg index="1" value="secret"/> <constructor-arg index="2" value="true"/> <constructor-arg index="3" ref="myPermissionList"/> </bean> There ought to be plenty of Spring docs how to setup spring beans and setup lists etc. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/