Do you mean it complains about UnitOfWork not being bound?

In that case you need to expose the binding. Multiple modules are a
bit experimental at the moment, and no one has really developed around
them afaik.

the now-defunct warp-persist project has had support for multiple
modules for awhile though.

Dhanji.

On Jul 8, 5:09 am, jdestef <[email protected]> wrote:
> 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.

Reply via email to