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: StatefulCalculator
NOTE: make sure Stateful Session Bean Type radio button is selected.
Click the Finish button.
The wizard has created two files: the Bean Implementation Class (StatefulCalculatorBean.java) and the Bean [Business] Remote Interface (StatefulCalculator.java):
StatefulCalculatorBean class:
package by.iba.ejb; import javax.ejb.Stateful; import by.iba.ejb.StatefulCalculator; public @Stateful class StatefulCalculatorBean implements StatefulCalculator { }
StatefulCalculator interface:
package by.iba.ejb; import javax.ejb.Remote; @Remote public interface StatefulCalculator { }
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |