Hello. 

I need to run a piece of code immediately after it has run PersistFilter. 

The only way is to write my own PersistFilter? Is this a good aproach ?

@Singleton
public final class PersistFilter implements Filter {
  private final UnitOfWork unitOfWork;
  private final PersistService persistService;

  @Inject
  public PersistFilter(UnitOfWork unitOfWork, PersistService persistService) 
{
    this.unitOfWork = unitOfWork;
    this.persistService = persistService;
  }

  public void init(FilterConfig filterConfig) throws ServletException {
    persistService.start();
    
    service1.start();    // <--- SOMETHING LIKE THIS

    service2.start();
  }
...

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/sXTRTVEwrcgJ.
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