• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

stateful session bean

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic