Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help in modeling user sessions using session beans.

sam bos
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.
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.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!