Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stateful session bean

 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
end if

check if user not logged in
force user login
end if
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.
 
Ramakrishnan Ponmudi
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is possible to check the user is logged in or not, but it depends on bean type, bussiness method or callback methods, lifecycle state of the bean.
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not understanding what you mean by bean type. Which bean are you referring to?

Any thoughts on having the above mentioned type of controlling logic in stateful session bean?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic