I am in the middle of some function in a stateful session bean. I need to check if the "user is logged in", "user login account is created", if not then i need to force them to happen and then continue executing remaining part of my function.
Let us say function A() in stateful session bean
perform step 1;
check if user account not created in
force user account creation
check if user not logged in
force user login
perform step 2
perform step 3
1> Does it make sense to have this kind of controlling logic in a stateful session bean? Any thoughts?
2> If i am using declarative authentication mechanism, then how do i control the login ui, user act creation ui to be displayed from stateful session bean.
Any thoughts or any useful relevant url pointers woule be very helpful.