1. Once in a while just logged in user got NullPointerException in this line:
RuleBasedPermissionResolver.instance().getSecurityContext().insert(user);
2. Once in a while
Name("agenciesFactory") @Scope(ScopeType.SESSION) public class AgencyFactory { @In(create = true) private EntityManager entityManager;
fails on
org.jboss.seam.RequiredException: @In attribute requires non-null value: agenciesFactory.entityManager
I can't reproduce it anytime I want (actually I can't reproduce it at all when i want), but it happens in production environment (Glassfish V2, mysql)
Is there anything I can do to reduce the pain?
Thanks,
If i recall correctly, injection of entityManager in a sessionScope does not play well. use Component.getInstance(...) instead. all values loaded this way should NEVER lazy load anything.
hope it helps