Creating an XDoclet EJB SessionBean

Create a SessionBean for an Enterprise JavaBean (EJB) project.

Prerequisites 
  1. In the Project Explorer, expand the EJB Projects category and your project resource directory. The Session Beans file appears.
  2. Right-click SessionBean in your project folder and select New > Other.
  3. Expand the EJB category, select XDoclet Enterprise JavaBean, and click Next.
  4. Select SessionBean and click Next.
    Note: If your annotation provider is invalid, you can change it directly from the wizard. Click Preferences.
  5. Define these EJB class file properties, then click Next:
    Field Action
    Project Select the project to contain the selected module.
    Folder Browse for a valid Java source folder within the project.
    Java Package Enter the package name for the selected module.
    Class Name Enter a class name for the SessionBean.
    Note: Begin the name with an uppercase letter, and do not use Unicode characters, as they are not supported for Enterprise Bean packages and classes.
    Superclass Enter a superclass if you want the SessionBean to inherit from a class other than the default java.lang.Object.
  6. Define these EJB connection properties, then click Next:
    Field Action
    EJB Name Enter a name for the EJB class.
    JNDI Name Enter the runtime server name.
    Display Name Enter an EJB name to be displayed in WorkSpace.
    Description Enter a description for the SessionBean.
    State Type Define the bean as one of:
    • Stateful SessionBean
    • Stateless SessionBean
    Transaction Type Select a transaction demarcation type.
  7. Click Finish to save the SessionBean definition and exit the wizard.

The SessionBean is added to the EJB Projects category in the Project Explorer.

Related concepts
Stateful SessionBean
Stateless SessionBean
Related tasks
Setting XDoclet Runtime Preferences

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.