• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJBs calling servlets  RSS feed

 
damian cosmos
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a web application which esentially consists of a group of applets embedded in JSP pages which call servlets.
I was thinking of providing an api into the servlets using EJB.
Does this defeat the purpose of EJBs as they can be called on distributed servers but the servlets will sit on a specific web server which the EJBs are dependent on.
 
Tim Holloway
Bartender
Posts: 18552
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not likely to be a "safe" use of EJBs - a JSP + JavaBean (non-Enterprise) might be more appropriate.
As a rule, the EJBs are on the bottom layer of the stack:

That's a pretty crude picture, and it doesn't allow for the dimension of time (e.g. Model 2 servlet->JSP forwarding), but if you stray to far from this sort of organization you'll run the risk of falling afoul of the mechanisms that have been developed for the safe handling of your requests.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!