Use the New Service wizard to create an EJB service. You have the option of binding service endpoints when you create a service using the wizard, or developing an abstract service and binding the service to its endpoints at a later time. An EJB service can only have one service endpoint.
Before beginning, verify that you have completed all of the setup.
To create an EJB service:
Open the New Service wizard. Select File | New | Service from the menu bar.
Select EJB Service and click Next.
Select the project that will use this service, and create a new service file. Name the file with a unique and descriptive name, and click Next.
Define the service information, and click Next.
Service Information
Field | Description |
---|---|
Name | Edit the file name. The wizard automatically enters a file name that is the same name as the service file in the Sybase project. |
Category | Enter a new category, or select an existing category from the drop-down list. NoteIf you plan to create multiple services, it is recommended that you group services into meaningful categories. |
Description | Provide an internal description, such as an explanation of how and where this service is used. You can also add notes for other developers who may be implement this service. |
Determine whether to bind the service. Choose from the following, and click Next:
Define the endpoint now.
Select Yes, create an endpoint now.
In the EJB Endpoint page, name the endpoint to be bound to this service, and click Next.
Define the connection properties. Choose from the following:
Browse for an existing endpoint definition. Select Reference from Enterprise Explorer, and click Browse. Select an EJB implementation to be your service endpoint, and click OK.
Define a new endpoint. Select User-specified, and complete the following, and click Next:
User-specified Endpoint
Property | Description |
---|---|
Remote Class Name | Specify the Java class for the remote class name. For example: com.sybase.test.ejbs.EJB9 |
Home Class Name | Specify the home class name. For example: com.sybase.test.ejbs.EJBHome |
JNDI Name | Specify the JDNI name of the initial ContextFactory. |
Initial Context Factory | Specify the Initial ContextFactory. For example:com.sybase.ejb.InitialContextFactory |
JNDI Provider URL | Specify the server URL. For example: <protocol>://<host_name>:<port number> |
Add a .jar file to your project for the client-side classes. Choose from the following, and click Next.
Locate an existing .jar file. Click Browse.
Generate a .jar file from the referenced server. Click Download.
Define the endpoint at a later time. Select No, create an endpoint later.
Add a classpath folder or library dependency in the Add Classpath Entries. Click Next.
Select the operations to create, and click Next.
Review the service details in the Summary page.
To edit a value, click Back.
Click Finish to complete the service.
The service file appears in the WorkSpace Navigator and the EJB service editor opens.
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com