On 11/18/2014 02:50 PM, Kalle Korhonen wrote: > You make your AuthorizingRealm a Tapestry service or at least let the ioc > @Autobuild it for you. This is all fairly well covered at > http://tynamo.org/tapestry-security+guide but sounds like you might not be > using tapestry-security. Anyway, here's an sample service realm (in JPA but > same difference): > https://github.com/tynamo/tynamo-federatedaccounts/blob/master/tynamo-federatedaccounts-test/src/test/java/org/tynamo/security/federatedaccounts/testapp/services/UserRealm.java > . I am using tynamo-security and setting the config and the realm via the AppModule:
@Contribute(WebSecurityManager.class) public static void addRealms(Configuration<Realm> configuration) { CredentialsMatcher credentialsMatcher = new RCredentialsMatcher(); RRealm realm = new RRealm(); realm.setCredentialsMatcher(credentialsMatcher); configuration.add(realm); } When the realm is created any @Inject is ignored (Session is always NULL). I have looked at the tynamo page and I do not see where its described or shown using the realm as a service.. am i missing something? Thanks > > Kalle > > On Tue, Nov 18, 2014 at 11:40 AM, dragon <milim...@gmail.com> wrote: > >> Im trying to access a hibernate entity/database from a shiro >> AuthorizingRealm extending class. Since the tapestry IOC does not inject >> outside Pages / Components, how do i access the Hibernate Session so i >> can access the database? >> >> >> Thanks for any suggestions. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org