Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet and ejb

 
P.Praveen Jesudhas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please tell me the basic purpose of servlet's and ejb.
 
Jaime M. Tovar
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A servlet is an interface that lets you work in a client-server model. The client submits a request to the server and the server uses a Servlet implementation to handle the client request and send a response. The servlet definition is in Java EE.

An ejb is a pattern, there are many kinds of ejb, but I think in essence they are a business logic encapsulation unit. They are also part of the Java EE.

In the simplest scenario a client wants something from a server, then sends a request lets say via a browser, then the server uses a specific servlet to handle the request. The servlet understands what the client wants and calls an ejb who is the one that knows the business logic. The EJB returns the results, the servlet interprets the results and sends the response to the client.

Both of them can be applied in many kinds of scenario, some ejb only talk with other ejb, some let you send messages to applications, etc.
 
Abdulla Mamuwala
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please ask these questions in the servlet and ejb forums. For such questions you can always "GOOGLE".

"A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model"
Reference URL

"Enterprise Java Beans is a component architecture for the development and deployment of object-oriented, distributed, enterprise-level applications. Applications written using the Enterprise JavaBeans architecture are scalable, transactional, multi-user and secure."
Reference URL

if you can't understand the above definitions please feel free to ask !!
have a nice day
 
P.Praveen Jesudhas
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you guyz
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic