blob: 66ab952b3ce9fd1dc63385c33d077bfba9eced0a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2008" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="Session Beans" />
<meta name="abstract" content="" />
<meta name="description" content="" />
<meta content="session beans, overview" name="DC.subject" />
<meta content="session beans, overview" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/sessbwiz.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="sessb" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>Session Beans</title>
</head>
<body id="sessb"><a name="sessb"><!-- --></a>
<h1 class="topictitle1">Session Beans</h1>
<div><p />
<p>A <strong>session bean</strong> is a type of enterprise bean. It is created by a
client and usually exists only for the duration of a single client-server
session.</p>
<p>Session beans are useful for describing interactions between other beans
(taskflow) and for implementing particular tasks. They do not represent data
in the database, but they can access data, so we can use session beans to
read, update, and insert data in a business process. Session beans access
data that spans concepts, is not shared, and is usually read-only. Session
beans contain business logic, and entities model persistent data. Session
beans are divided in two types: stateless session beans and stateful session
beans.</p>
<ul>
<li><strong>Stateless session beans</strong> <p>A stateless session bean is pooled by
the container to handle multiple requests from multiple clients and does not
maintain any conversational state.</p>
</li>
<li> <strong>Stateful session beans</strong> <p>A stateful session bean acts on behalf
of a single client and maintains client-specific session information (called
conversational state) across multiple method calls and transactions. It exists
for the duration of a single client/server session.</p>
</li>
</ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/sessbwiz.html" title="You can use a wizard to create a session bean and add it to your project.">Creating EJB Session Beans</a></div>
</div>
</div>
</body>
</html>