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

Creating a, EJB 3.0 session bean using the wizard

You can use the Create Session Bean wizard to create a session bean in your EJB project.

Here are the steps to create a session bean in an EJB project:
  1. In the Java™ EE perspective, right-click your EJB Project, and select File > New > Session Bean . The Create Session Bean wizard appears.
  2. In the Project field, ensure that your EJB Project name appears.
  3. In the Folder field, select the source folder for the new bean.
  4. In the Java package field, type the package name for the new bean.
  5. In the Class name field, type the name that you want to assign to the session bean. By convention, bean names should begin with an uppercase letter.
    Note: You can use Unicode characters for the bean name, but Unicode characters are not supported for enterprise bean packages and classes associated with enterprise beans.
  6. In the Superclass field, Browse to find a Superclass to add to your Session bean.
  7. In the State Type field, select the type of Session bean you want to create. Valid options are
    • Stateless
    • Stateful
  8. OptionalIn the Create Business Interface field, select Local or Remote if you want to include these interfaces.
  9. Click Next.
  10. On the Session Bean information page, you may change the values of some of the Session bean elements:
    • Optional: In the EJB Name field, you can change the value of your EJB name that you assigned in the previous page.
    • Optional: In the Mapped Name field, type a value for your EJB Mappedname.
    • Optional: In the Transaction Type field, select the type of Session bean you want to create (Container or Bean).
    • Optional: In the Business Interfaces field, you can add or remove Business Interfaces that you created in the previous wizard page.
  11. Click Finish.
  12. In the Java class editor, your new Session bean appears, with the @Stateless annotation and the required import statements.

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