...
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
- Right-click on the SampleEJB project and select New -> Interface and fill it in with the following values:
Section - Package: sampleear
- Name: RemoteBusinessInterface
...
...
- Click Finish.
Add Now we need to add a business method and mark the interface as a remote one with @Remote
annotation.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
package sampleear; import javax.ejb.Remote; @Remote public interface RemoteBusinessInterface { public String sayHello(String name); } |
...