blob: 5dcb032bdfaf597193cd6187fe37175a640c69d4 [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="Developing EJB 3.0 Applications" />
<meta name="abstract" content="You can use the workbench to develop and test enterprise beans that conform to the distributed component architecture defined in the Sun Microsystems Enterprise JavaBeans (EJB) 3.0 specification." />
<meta name="description" content="You can use the workbench to develop and test enterprise beans that conform to the distributed component architecture defined in the Sun Microsystems Enterprise JavaBeans (EJB) 3.0 specification." />
<meta content="Enterprise JavaBeans 3.0" name="DC.subject" />
<meta content="Enterprise JavaBeans 3.0" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/ceover.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/tecrtpro.html" />
<meta scheme="URI" name="DC.Relation" content="../topics/ccontentassist3.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="cejb3" 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>Developing EJB 3.0 Applications</title>
</head>
<body id="cejb3"><a name="cejb3"><!-- --></a>
<h1 class="topictitle1">Developing EJB 3.0 Applications</h1>
<div><p>You can use the workbench to develop and test enterprise beans
that conform to the distributed component architecture defined in the Sun
Microsystems Enterprise JavaBeans (EJB) 3.0 specification.</p>
<p> Using this specification, you can develop beans more simply than in the
2.1 standard. You can annotate your Java source code to provide information
that was previously contained in XML deployment descriptors. Using Java™ annotations
allows you to create EJBs and Java Persistence Architecture (JPA) beans
quickly and easily from “plain old Java objects (POJOs). For EJBs, these can
be created without implementing EnterpriseBean interfaces. </p>
<p>This product supports the Enterprise JavaBeans 2.1 and 3.0 specification
levels. All of the EJB tools in the product are accessible from the Java EE
perspective in the workbench. You can create session beans (stateful or stateless)
or message-driven beans, by simply specifying the component defining annotation
in your POJO. Additional configuration for your bean can be done by specifying
additional annotations in the Java class. The Java editor provides validation, content
assistance and QuickFixes for your EJB 3.0 annotations, as well as support
for refactoring beans. For richer assistance with the EJB 3.0 annotations,
you can use the Annotations view to add or delete annotations, and to modify
the attribute values of annotations. Deployment descriptors for your EJB 3.0
modules are optional, but can be created for additional configuration.</p>
<div class="p">Java EE 5 streamlines EJB development in the following ways: <ul>
<li>Fewer required classes and interfaces<ul>
<li>Home and object interfaces are no longer required – you need the business
interface only</li>
<li>No need to implement javax.ejb.SessionBean</li>
<li>No need to declare checked exceptions</li>
</ul>
</li>
<li>Optional deployment descriptors<ul>
<li>Annotations provide component definition and dependency injection</li>
</ul>
</li>
<li>Simple lookups<ul>
<li>new EJBContext() interface method replaces JNDI calls</li>
</ul>
</li>
<li>Lightweight persistence for object-relational mapping<ul>
<li>Entities are POJOs that provide an object-oriented view of the data stored
in relational database</li>
</ul>
</li>
<li>New Interceptors class (new in Java EE 5)<ul>
<li>Interceptors are objects that can intercept a call to a business method
(to handle security for example)</li>
<li>Similar in purpose and action to servlet filter or Web services handler</li>
<li>Provide limited form of aspect-oriented programming</li>
</ul>
</li>
</ul>
</div>
<p>For further additional information on EJB 3.0, see the official specification: <a href="http://jcp.org/en/jsr/detail?id=220" target="_blank">JSR 220: Enterprise JavaBeans™ 3.0</a></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="../topics/tecrtpro.html">Creating EJB projects</a></strong><br />
An EJB project is used to organize the resources contained in an EJB module.</li>
<li class="ulchildlink"><strong><a href="../topics/ccontentassist3.html">Content assist and EJB 3.0</a></strong><br />
The content assist tool is a feature of the workbench. You can type code in your Java editor and the content assist tool recommends possibilities to complete your code.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/ceover.html" title="The workbench provides a specialized environment that you can use to develop and test enterprise beans that conform to the distributed component architecture defined in the Sun Microsystems Enterprise JavaBeans (EJB) version specification. This product supports the Enterprise JavaBeans 1.1, 2.0, 2.1, and 3.0 specification levels.">EJB 2.x application development</a></div>
</div>
</div>
</body>
</html>