Hi all,
I have implemented the UnitOfWorkApplicationListener for accessing two
database in one requests.
And I also use @UnitOfWork in Jersey class.
But I still could not get the session at runtime, Are there are there any
suggestion?
Or are there some documents to use the UnitOfWorkApplicationListener
correctly?
Thank you so much.
@Override
public void run(MobileAppConfiguration configuration, Environment
environment) throws Exception {
final UserDao userDao = new
UserDao(hibernatebudleA.getSessionFactory());
final AuthUserTokenDao authUserTokenDao = new
AuthUserTokenDao(hibernatebudleB.getSessionFactory());
UnitOfWorkApplicationListener listener = new
UnitOfWorkApplicationListener("hibernate.gouser",
hibernatebudleB.getSessionFactory());
test.registerSessionFactory("hibernate", hibernatebudleA.getSessionFactory());
environment.jersey().register(listener);
environment.jersey().register(new LoginResource(userDao,
authUserTokenDao));
}
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.