As usual, we will do this sample in a step by step manner.
Step One??”Define and Deploy the EJB Service
The EJB service we implement is very simple; the classes and interfaces involved are
shown in the following figure:
EJBObject SessionBean EJBHome
HelloServiceHome
HelloServiceBI
HelloService
realizes creates
+hello()
HelloServiceBean
Developer Classes
EJB API
Binding EJB in a JBI Container
[ 150 ]
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 chapter and change the paths there to match
your development environment. The code download for this chapter also includes a
README.txt file, which gives detailed steps to build and run the samples.
For the sample deployment, we will use BEA Weblogic server's example domain.
Pages:
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219