Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using EJB in JSP

 
Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed a web application which doesnt have a specific tier architecture , could u pls help me as in telling me how i cld possibly componentise the architecture using EJB...
As for now the functionality of my appliaction involves..
1)Checking for session validity
2)Display menus as accrding to type of users
3)Mailing solutions to users logged in , in response to their queries
 
Ashok Mash
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO, there's no need for EJBs for the kind of functionality that you have mentioned. I could be wrong though!
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ashok Mash:
IMHO, there's no need for EJBs for the kind of functionality that you have mentioned. I could be wrong though!

I would agree with the above statement... however if you decide to continue with EJB for your application than you should definitely not be directly accessing them from your JSPs. I suggest that you look into some various Web Frameworks such as Struts, WebWork, or Spring to decouple your presentation from your business logic.
The other thing that you will want to read up on, regardless of whether you use a Web Framework or not, is the Business Delegate Pattern to simplify and encapsulate access to your EJBs.
 
Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u for ur reply....
I was thinking of the followong architecture...
1)JSP pages for Presentation Tier
2)A bean to act as a look up Service
3)EJBs to perform session management,database operations..
Cld u pls inform me of a better architecture..
Thank u once again
 
Anselm Paulinus
Ranch Hand
Posts: 390
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search and read up MVC model 2 architecture. It will help you here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!