Hi, will this work for you?
public static void contributeSecurityConfiguration( Configuration<SecurityFilterChain> configuration, SecurityFilterChainFactory factory, HibernateSessionSource sessionSource) { Session session = sessionSource.create(); ... On Mon, Aug 20, 2012 at 3:49 PM, ksrijith <ksrij...@gmail.com> wrote: > Hi, > I'm using Tapestry 5.3.1 with Tapestry-Hibernate 5.3.1. I'm also using > Tapestry-security0.4.6 to provide authentication on some of the admin pages > for the application. Since we need to provide the urls in the APP module to > provide the authentication as shown below: > public static void contributeSecurityConfiguration( > Configuration<SecurityFilterChain> configuration, > SecurityFilterChainFactory factory) { > configuration.add(factory.createChain("/admin/**") > .add(factory.roles(), "SYSTEM").build()); > } > > I was wondering if its possible to get a Hibernate session or inject the > Session in AppModule which I could use to pull the URLS for contributing > the > security configuration from the DB rather than hardcoding it in the code. > > Since the method is a static method I wanted to know if I could inject a > static Session variable or a static dao variable which could be used to > fetch the data from the database. > > Thanks and Regards, > Srijith > > > > ----- > -- > Don't Forget to Rate > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Hibernate-Session-in-App-Module-tp5715591.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Dmitry Gusev AnjLab Team http://anjlab.com