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

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 message-driven bean using the wizard

You can use the Create Message-Driven Bean wizard to create a message-driven bean in your EJB project.

The main difference between a message-driven bean and a session bean is that a message-driven bean has no local or remote interface. Instead, it has only a bean class. To create a message-driven bean within your EJB project, follow these steps:

  1. In the Java™ EE perspective, right-click your EJB Project, and select File > New > Message-Driven Bean . The Create Message-Driven 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 Destination Name field, type the name of your message destination.
  8. In the JMS field, Select JMS if you want to use Java Messaging Service, and in the Destination Type field, select the type of destination.
    • Queue
    • Topic
  9. Click Next.
  10. On the Message-Driven 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 Transaction Type field, select the type of Session bean you want to create (Container or Bean).
    • Optional: In the Interfaces field, you can add or remove Business Interfaces that you created in the previous wizard page.
    • Optional: In the Which method stubs would you like to create? field, you can create one or both of these methods:
      • Inherited abstract methods
      • Constructors from superclass
  11. Click Finish.
  12. In the Java class editor, your new Message-driven bean appears, with the @MessageDriven annotation and the required import statements.

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