• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

PartII - security in web or ejb tier

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, I am not going to use J2EE security in the assignment. Why? Do to the fact of the users being able to add themselves at runtime (create profile). IMHO this is where the J2EE security falls short. One has to write a custom RealmAccessor to handle managing users at runtime.
So I decided I would take the route of the Petstore and have a very thin entity bean (username/password) that represents a "logon" in the system. So now I have the question as to where do I guard my resources. In the web tier or in the ejb tier?
Just wanted to get some other opinions on my approach.
Also is anyone using an EJBController pattern similar to the Petstore? I am going with a simple BusinessDelegate-SessionFacade where the SessionFacade is a SFSB that holds the currently logged in user among other things.
Thoughts?
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting question... any thoughts ?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is pretty interesting. Well I have looked at the EJBController pretty close in our project last year. There are some advantages with using this design:-
-> Higher Abstraction
-> Web-tier is more clearly separated from presentation-tier.
->Scalability is forced as you keep transactions demarcated at EJB / business-tier but not right from Web-tier.
But one should also see the possible limitations:
->Does a extra Controller all that much for me?
as I already have a Controller in Web-tier(Struts, Action Servlet).
-> It may hinder users in case of transactions being passed around from non-EJB environments if supported in future.
We decided not to go with this approach as it seemed overkill and we used a simple Business Delegates which use Service Locators and obtain the appropriate Service.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic