Hi,
I'd like to use a second persistence unit in a web application. I have
a persistence module that currently looks something like this:
public MyServletModule extends ServletModule {
.........
........
// Jpa
install(new JpaPersistModule("unitName"));
filter("/*").through(PersistFilter.class);
}
The documentation suggests installing multiple units using the
PrivateModule class. It also says indicates that filter("/
*").through(PersistFilter.class); can be called multiple times for
each private JpaModule. I tried the following but get binding errors
for PersistService and UnitOfWork:
public MyServletModule extends ServletModule {
.........
........
// Jpa
PrivateModule priv = new PrivateModule {
install(new JpaPersistModule("unitName"));
filter("/*").through(PersistFilter.class);
}
install(priv);
}
Has anyone successfully implemented this feature. I've seem only a
couple of posts on the forum about the subject. It would be great if
there was an example of this in the tests for the persist extension.
Any help appreciated.
Thx
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.