This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help in modeling user sessions using session beans.

 
sam bos
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
I am trying to model users server session using EJBs on weblogic server.
Here is what i am trying to get.
The site has two types of users .. regular and admin users
Both have the same login page, depending on the user profile user will see the admin capabilities on the page.
Would like to intorduce session Facade pattern.
Users can do Ordering and Order status functions.
Admins can do User management functions, new user creation.
Here is what i did:
Created a UserSessionEJB that will be started by the main controller servlet after the user is logged in and will be stored on HttpSession object.
When user loggs in the UserSessionEJB is created and the permissions of that particular user are loaded.
This session will have user specific functions .. placeOrder and getOrderStatus
This UserSession also has getAdminService method which is modeled across stateless session EJB. which has admin specific services.
----
Based my proposed solution, i appreciate if you guys could provide some solution for doing this in the best way .. i also appreciate if you guys can give some new strategy of handling this..
Thanks a lot.
sam
 
Siddhartha Bhattacharya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
configure <security-constraint> in web.xml to do this. this specifies who is authorized to access a URL pattern.
much simpler to implement.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic