4 Replies Latest reply on Feb 1, 2012 3:27 AM by Adam Warski

    Envers and current user in Seam 3

    marx3 Apprentice


      It's probably simple but I didn't find good answer. In documentation there is an example with Seam 2 using Component.getComponent to access username. Hovewer in Seam 3 I need to use another method. I can use in listener


      BeanManagerLocator locator = new BeanManagerLocator(); BeanManager beanManager = locator.getBeanManager();


      (I can probably extends BeanManagerAware interface too, but above method works)


      But I don't know how to lookup current session bean? Will BeanManager give me only my session bean, and not beans of other logged in users?


      Maybe I should use RevisionListener interface on some type of bean? But what scope such a bean should use?