Javatouch EJB3 tutorial is intended to give a fast start to EJB 3 by helping develop a simple EJB3 application in quick time. Once you have the look and feel of EJB3 your learning curve is going to be small. We will create a small Stateless Session bean, deploy and then write a small client to use it. That’s all.. No fuzz!! Java is for fun not for serious..... JavaTouch is here for helping hand.... Enjoy EJB 3....
1. Choose File > New Project (Ctrl-Shift-N) from the main menu.
7. On ConverterBean-ejb select Right Hand Mouse(RHM) click menu New > Session Bean
ConverterBean Enterprice Bean class and ConverterRemote Business Interface class will be generated by IDE.
9. Now add following two business methods to the Bean interface.
public BigDecimal dollarToYen(BigDecimal dollars);
10. Press Alt-Shift-F to generate any necessary import statements for the class.
11. Now Open the ConverterBean class and add the relevant implementation of the business methods.Press Alt-Shift-F to generate any necessary import statements for the class.
12. Now build the ConverterBean-ejb project (Right Hand Mouse(RHM) click menu Build Project)
14. Open the ConverterClient class in ConverterBean-app-client project created. (This is already created because we selected the Create Application Client Module at step 4)
You will see an out put like follows in the console.
$10110.00 is 1165784.10 Yen.
Copy Rights @ JavaTouch.