Comment #16 on issue 597 by [email protected]: Persist Extension:
UnitOfWork.begin() throws IllegalStateException when called multiple times
http://code.google.com/p/google-guice/issues/detail?id=597
I am seeing the same behavior as indicated by the above link regarding the
PersistFilter. In my case, I am using Shiro which has some filters that
will cause all filters to process a request a second time. This will
include the Persist filter, which will then blow up when it starts the unit
of work again.
To "fix" this locally, I implemented a wrapper around the PersistFilter
that basically implements a pattern in the Shiro class
OncePerRequestFilter. That is, I check an attribute on the request
called "PERSIST.FILTERED" and only call to the wrapped filter if this has
not been set to true.
So, a couple of questions:
- Is this a bad idea or a sign that I have done something else awry?
- Any reason not to have this logic in the main PersistFilter directly?
(I can put together a pull request easily enough.)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.