Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Every stateless session ejb has its own business interface. There 're are three types of business interfaces - @Remote, @Local and @WebService - and their combinations of these three. Suffice No need to say that every EJB development starts from defining a business interface and implementing it by a bean implementation class so, that is exactly what we will be doing in the next steps.

Create remote business interface

  1. Right-click on the SampleEJB project and select New -> Interface and fill it in with the following values:
    Section
    • Package: sampleear
    • Name: RemoteBusinessInterface

...


  1. Image Added

...


  1. Click Finish.

Add Now we need to add a business method and mark the interface as a remote one with @Remote annotation.

Code Block
java
java
borderStylesolid
titleRemoteBusinessInterface.java
package sampleear;

import javax.ejb.Remote;

@Remote
public interface RemoteBusinessInterface {
    public String sayHello(String name);
}

...