Indeed, that'll do :)You also don't need to bind it, that filter statement
is all you need. We annotated PersistenceFilter with @Singleton so Guice can
JIT the binding.

Robbie

On Tue, Apr 7, 2009 at 5:08 PM, Eduardo Nunes <[email protected]> wrote:

>
> Actually I'm using trunk version of google-guice and warp-persist, so
> I don't need to start the persistence service anymore? I just need to
> put in my WebModule
> filter("/*").through(PersistenceFilter.class) right?
>
>
> On Tue, Apr 7, 2009 at 11:53 AM, Robbie Vanbrabant
> <[email protected]> wrote:
> > Note that Dhanji is talking about the yet to be released WP 2.0.
> > Also, Dhanji doesn't seem to remember that he convinced me to drop
> > LifecyclePersistenceFilter ;-). The PersistenceFilter will automatically
> > start/stop your PersistenceService(s).  See http://tinyurl.com/cbw9vafor
> > some more information.
> > You can get the latest WP 2.0 snapshot here: http://tinyurl.com/cg7nql
> > New features: http://tinyurl.com/dl2fyl
> > Cheers
> > Robbie
> >
> > On Tue, Apr 7, 2009 at 4:28 PM, Dhanji R. Prasanna <[email protected]>
> wrote:
> >>
> >> The servlet extension is a good choice for this. Note that you do not
> need
> >> a persistence service initializer if you boot up Warp Persist in your
> >> ServletContextListener (after creating the injector) or better yet just
> use
> >> Warp Persist's LifecyclePersistenceFilter (register in WebModule) and it
> >> takes care of the start and shutdown for you.
> >> Dhanji.
> >>
> >> On Tue, Apr 7, 2009 at 11:05 PM, Eduardo Nunes <[email protected]>
> wrote:
> >>>
> >>> Hi there,
> >>>
> >>>  After a long period of reading, now I'm starting to code my
> >>> application using these frameworks: Wicket, Google Guice and
> >>> Warp-persistence. I facet a conceptual problem (IMHO) about how
> >>> initialize google guice. I read a lot of source codes on the internet
> >>> and most of them, if not all, initialize Google Guice and
> >>> Warp-persistence inside the WicketApplication class (extends
> >>> WebApplication). I think it isn't a good thing, because in the
> >>> conceptual point of view google guice doesn't have direct relation to
> >>> wicket. So, I started to find a good solution for this problem.
> >>>  My solution consists in use Google Guice servlet extension. I think
> >>> that sometimes a source code says more than a thousand words ehehe,
> >>> below are the pastbin links for all envolved files. What I want from
> >>> you is a feedback, suggestions, improvements, critics, etc...
> >>>
> >>> Files:
> >>> - web.xml
> >>>    http://pastebin.com/f576189de
> >>>
> >>> - GuiceServletContextListener
> >>>    http://pastebin.com/f6a42d811
> >>>
> >>> - WebModule
> >>>    http://pastebin.com/f24a797b
> >>>
> >>> - ServiceModule
> >>>    http://pastebin.com/f6e9db66f
> >>>
> >>> - PersistenceServiceInitializer
> >>>    http://pastebin.com/f6e4425fd
> >>>
> >>> Maybe, and probably, some parts of the pasted source code are based on
> >>> another projects, blogs posts, etc.
> >>>
> >>> Thanks,
> >>> Eduardo S. Nunes
> >>>
> >>> (this message was sent to wicket group list too)
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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