Download EJB - Agile Computers

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
1. What is Servlet Collaboration?
The Servlet collaboration is all about sharing information among the servlets.
Collaborating servlets is to pass the common information that is to be shared directly by
one servlet to another through various invocations of the methods. To perform these
operations, each servlet need to know the other servlet with which it is collaborated. Here
are several ways to communicate with one another:





Using RequestDispatchers include() and forward() method;
Using HttpServletResponse sendRedirect() method;
Using ServletContext setAttribute() and getAttribute() methods;
Using Java's system-wide Properties list;
Using singleton class object.
**************************************************************************************
2. What do you mean by Enterprise Computing?
Enterprise computing refers to business-oriented information technology that is critical to
a company’s operations. Enterprise computing encompasses all the various types of
enterprise software, including database management, relationship management and so on.
Enterprise computing is usually seen as a collection of big business software solutions to
common problems such as resource management and streamlining processes.
**************************************************************************************
3. What is Enterprise Java Beans ( EJB )?
EJB is written in Java programming language and it is server side component
that encapsulates the business logic of an javaapplication from customers. Business logic
code is managed in EJB that fulfills the purpose of the java applications. For example, in
an e-Commerce web application, the enterprise java beans might implement the business
logic in methods calledcheckAvailableItem and orderProduct.
**************************************************************************************
4. Benefits of Enterprise Java Beans EJB
EJB technology enables rapid and simplified the process of distributed, transactional,
secure and portable java desktop applications development and Java-EE web applications
development because :


EJB container provides System level services to enterprise java beans.
EJB developer just focuses on business logic and on solving business problems.
Because business logic lies in EJB, so Front end developer can focus on the
presentation of client interface.

The client developer does not have to code the routines that implement business
rules or access databases. As a result, clients side has less codes which is particularly
important for clients that run on small devices.

Java Beans are portable components which enable the java application assembler to
build new applications from existing java beans.

EJB is a standard API due to which applications build on EJB can run on
any complaint Java EE web applicationserver.

***************************************************************************
5. Why jsp is Slower than Servlet?
First time when JSP engine encounter JSP request, it convert JSP in servlet, compile it and
the bytecode format it saves in JSP Container along with the time stamp. Due to this process
the first time response of JSP as compaired to servlets is slower, much slower.
But from next request onword JSP engine checks the time stamp of the request and of JSP
compiled file in JSP Container in JVM, and if the file is not changed then it redirects this
request to that class file. And client get the response.
In case of servlet the compiled servlet, ie class files are stored in Servlet Container in JVM.
As both servlet and JSP is handled with same processes and sharing the resourses (JVM),
there is no difference in performance of both.
***************************************************************************
Home Work Question:
Practical Question
1. Create a jsp Program that access a java bean.
2. Create a Jsp Program to print “Hello World”.
3. Create a servlet that use POST Request and retrieves the parameters and the html
browser displays the parameters.