-
1. Re: Override producer methods implementation
kwintesencja Jan 5, 2014 11:54 AM (in response to kwintesencja)for now instead of using @producer method im using a common interface plus @Specializes such as:
@SessionScoped
public class BaseSecurityContext implements Serializable ,SecurityContext{
@Override
public Boolean loggedIn() {
return Boolean.FALSE;//by default user is never logged in
}
}
@SessionScoped
@Specializes
AppSecurityContext extends BaseSecurityContext{
@Override
public Boolean loggedIn() {
//application decide if user logged in
}
}
So to track if user is logged in i use SecurityContext interface(which is in a third party library).
-
2. Re: Override producer methods implementation
mkouba Jan 6, 2014 6:30 AM (in response to kwintesencja)Hi Rafael,
your solution makes sense. You could also specialize the producer method but this would not completely override the BaseSecurityContext bean which is desirable in this scenario...