Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Web Tools Guide
Previous Page Home Next Page

Developing EJB 3.0 Applications

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.

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.

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.

Java EE 5 streamlines EJB development in the following ways:
  • Fewer required classes and interfaces
    • Home and object interfaces are no longer required – you need the business interface only
    • No need to implement javax.ejb.SessionBean
    • No need to declare checked exceptions
  • Optional deployment descriptors
    • Annotations provide component definition and dependency injection
  • Simple lookups
    • new EJBContext() interface method replaces JNDI calls
  • Lightweight persistence for object-relational mapping
    • Entities are POJOs that provide an object-oriented view of the data stored in relational database
  • New Interceptors class (new in Java EE 5)
    • Interceptors are objects that can intercept a call to a business method (to handle security for example)
    • Similar in purpose and action to servlet filter or Web services handler
    • Provide limited form of aspect-oriented programming

For further additional information on EJB 3.0, see the official specification: JSR 220: Enterprise JavaBeans™ 3.0


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire