First of all tell me when to use EJB and when to use only Jsps and sevlets??
Can anyone help me out on this???
How can I call thestateless session from a jsp and how do I transfer the parameters from jsp/servlet to Session bean???
plz help
Discussions
Web tier: servlets, JSP, Web frameworks: How to call stateless session bean from a servlet or JSP
-
How to call stateless session bean from a servlet or JSP (4 messages)
- Posted by: Richa Pandharikar
- Posted on: September 24 2002 14:55 EDT
Threaded Messages (4)
- How to call stateless session bean from a servlet or JSP by Sameer Desawale on September 25 2002 01:38 EDT
- How to call stateless session bean from a servlet or JSP by Raj S on September 25 2002 03:50 EDT
- How to call stateless session bean from a servlet or JSP by Raj S on September 25 2002 04:39 EDT
- How to call stateless session bean from a servlet or JSP by Raj S on September 25 2002 04:43 EDT
-
How to call stateless session bean from a servlet or JSP[ Go to top ]
- Posted by: Sameer Desawale
- Posted on: September 25 2002 01:38 EDT
- in response to Richa Pandharikar
To answer your first question ... if you've ever heard of the MVC (Model-view-controller) pattern or n-tier pattern of development, then the JSP/Servlets are the 'View' part of it - or the 'Presentation' layer in the n-tier system. Meaning, they are primarily responsible just for displaying the data & accepting input. To some extent JSP/Servlets can be 'Controllers', i.e. they can control/define the flow of an application.
However, it is bad design to put your 'Model' part (i.e. the 'business logic' part) in JSP/Servlets. That is what you use the EJBs for. EJBs (Session/Entity/Message) should ideally be used to handle the business rules part of your app. This allows your app to easy to maintain when there are changes & also provides you with all benefits of the J2EE architecture - i.e. scalability, security, pooling, transactions, distribution, messaging & naming.
My advice ? Try to put display logic in JSP/Servlets & put your business logic in EJBs - easy as pie.
Sameer. -
How to call stateless session bean from a servlet or JSP[ Go to top ]
- Posted by: Raj S
- Posted on: September 25 2002 03:50 EDT
- in response to Richa Pandharikar
Here are links for first question...
http://www.theserverside.com/resources/article.jsp?l=Is-EJB-Appropriate
http://www.cs.unc.edu/Courses/comp119/docs/lessons-others/ejb-brown-02/EJBArchitectures.pdf
This will help you deciding When to use EJBs...
Raj -
How to call stateless session bean from a servlet or JSP[ Go to top ]
- Posted by: Raj S
- Posted on: September 25 2002 04:39 EDT
- in response to Richa Pandharikar
You can have a look at this link for calling Stateless Session bean from either JSP or Servlet -
How to call stateless session bean from a servlet or JSP[ Go to top ]
- Posted by: Raj S
- Posted on: September 25 2002 04:43 EDT
- in response to Raj S
Sorry Here is the link
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/DEA2eTOC.html