Select File > New > Other... from the Eclipse menu.
Browse to EJB 3.0 > Session Bean and click the Next button.
In the Create a new EJB 3 Session Bean dialog, enter the following:
The Bean Package field: by.iba.ejb
The Bean Name field: StatelessCalculator
NOTE: make sure Stateless Session Bean Type radio button is selected.
Click the Finish button.
The wizard has created two files: the Bean Implementation Class (StatelessCalculatorBean.java) and the Bean Remote Interface (StatelessCalculator.java):
StatelessCalculatorBean class:
package by.iba.ejb; import javax.ejb.Stateless; import by.iba.ejb.StatelessCalculator; public @Stateless class StatelessCalculatorBean implements StatelessCalculator { }
StatelessCalculator interface:
package by.iba.ejb; import javax.ejb.Remote; @Remote public interface StatelessCalculator { }
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |