Enterprise JavaBeans-Understanding Session Beans

Enterprise JavaBeans-Understanding Session Beans -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
INTERNATIONAL INSTITUTE OF INFORMATION TECHNOLOGY P-14, Pune Infotech Park, Hinjawadi, Pune – 411 057 Enterprise JavaBeans: Understanding Session Beans Session beans were first introduced in March of 1998 when Sun Microsystems published the EJB 1.0 specification. A session bean is one type of enterprise bean that resides in EJB container. Session beans model business processes. They provide a robust way for handling sessions in a J2EE application. What Is Conversational State? Client/server interaction typically involves multiple request/response roundtrips. A session is a single client's interaction with a server. The session state is client-specific data that is accumulated during the session. This session state is also known as conversational state . The conversational state can be maintained in the client, the server, or split between them. For example, the contents of the temporary shopping cart can be maintained in the client side or in the server object's instance variables. The division of responsibility is based on factors such as performance, security, and so on. The use of session beans to maintain client interactions is the standard method in any J2EE application. As their name implies, session beans were designed with this purpose in mind. Services such as security, concurrency, and transactions are provided to session beans by the container. What Are Session Beans? A session bean implements a conversation between a client and the server side. Session beans execute a particular business task on behalf of a single client during a single session. They implement business logic such as workflow, algorithms, and business rules. You can think of a session object as extension of client on the server side. It works for its client, sparing the client from complexity by executing business tasks inside the server. For example, a session bean can send email, help in workflow management, and implement algorithms such as compression, encryption, and so on. NOTE Session bean clients can be from the EJB tier, as other session beans, from the Web tier, as servlets and taglibs, or they can be from the client tier as a J2EE client. The session bean by itself implements the business logic. The container provides functionality for remote access, security, concurrency, transactions, and so on. Session Bean Files Like other enterprise beans, a session bean consists of the home interface, the component interface, the bean class, and the deployment descriptor. The home interface is either a remote home interface or local home interface. A remote home interface extends the javax.ejb.EJBHome interface, whereas a local home interface extends javax.ejb.EJBLocalObject. The home interface is used as the bean factory. The client uses the home interface to manage the life cycle of the session bean.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 12

Enterprise JavaBeans-Understanding Session Beans -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online