• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Login procedure

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All!
How is login/logout is typically done. I'm just chosing between two options:
1. Entity bean represents user and have a business methods is obtained via finder method with login and password and stored using Handle.
2. Statefull session bean do this (session facade), therefore it manage a session for user.
Which one do you prefer and why?
P.S. Two client types are exists (Web and Swing)
[ May 29, 2004: Message edited by: Renat Zubairov ]
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Renat,

You would protect the bean and authenticate from the web-tier(use web authentication) or the J2SE client side(use JAAS). (You would use container managed security)

You would not want to use any of the following approaches because:

1. Entity bean represents user and have a business methods is obtained via finder method with login and password and stored using Handle.


Entity bean's finder methods should not have login credentials. You will have a problem if a stateless session facade would want to use this entity bean.(You may have to send the credentials everytime)

2. Statefull session bean do this (session facade), therefore it manage a session for user.
Which one do you prefer and why?


It is generally good to minimize the usage of Stateful session beans for scalability constraints. And, if the thick client dies prematurely, there is no clean way of sending the Stateful Session bean back to pool.

Any other thoughts guys?

Dushy
[ June 02, 2004: Message edited by: Dushy Inguva ]
 
Don't touch me. And dont' touch this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic