interview questions and answers

Java Interview Questions | EJB Interview Questions

Home interview questions JAVA interview questions EJB 
Wednesday, 08 February 2012
Main Menu
Home
Online Test
Contest
Search
FAQs
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions JAVA interview questions EJB

This category contains EJB Interview Questions and Answers


When to Use Session Beans ?

PDF Print E-mail

In general, you should use a session bean under the following circumstances: • At any given time, only one client has access to the bean instance. • The state of the bean is not persistent, existing only for a short period of time (perhaps a few hours). Stateful session beans are appropriate if any of the following conditions are true: • The bean's state represents the interaction between the bean and a specific client. • The bean needs to hold information about the client across method invocations. • The bean mediates between the client and the other components of the application, presenting a simplified view to the client. • Behind the scenes, the bean manages the work flow of several enterprise beans. For an example, see the AccountControllerEJB in the The Duke's Bank Application. To improve performance, you might choose a stateless session bean if it has any of these traits: • The bean's state has no data for a specific client. • In a single method invocation, the bean performs a generic task for all clients. For example, you might use a stateless session bean to send an email that confirms an online order. • The bean fetches from a database a set of read-only data that is often used by clients. Such a bean, for example, could retrieve the table rows that represent the products that are on sale this month.




Be first to comment this article

Only registered users can write comments.
Please login or register.

 
< Prev   Next >

Java Interview Questions | EJB Interview Questions

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony