We will not spend too much time describing how to write and deploy an EJB component, since there are a lot of books and resources available which will do just that. However, we will spend some time looking at how we can use Spring beans to Spring-wrap an EJB service. More time will be spent on actual binding of EJB and related discussion. As usual, we will do this sample in a step by step manner.
The EJB service we implement is very simple; the classes and interfaces involved are shown in the following figure:
We need to abstract out the interface from all EJB specific details; hence, we have followed the BI pattern to define the interface. HelloServiceBI is the BI, which is void of any EJB specific API.
package samples; public interface HelloServiceBI { String hello(String phrase) throws java.io.IOException; }
As a first step and if you haven't done it before, edit examples.PROPERTIES
provided along with the code download for this...