We have the code base split
up into multiple folders each representing separate artifacts, which go into the final
SAs as shown in the following figure.
SoapBinding
src
binding-su
xbean.xml
components
engine-su
sa
xbean.xml
META-INF
jbi.xml
samples
HelloServiceBI.java
HelloServicePojo.java
build.xml
servicemix.xml
Client.html
The components folder is supposed to contain lightweight (or POJO) components,
but in our case, we have a simple service class (HelloServicePojo) implementing
a BI (HelloServiceBI), this is shown in the following code:
public interface HelloServiceBI
{
String hello(String phrase);
}
public class HelloServicePojo implements HelloServiceBI
{
private static long times = 0;
Chapter 6
[ 129 ]
public String hello(String phrase)
{
System.out.println("HelloServiceBean.hello{
" + (++times) + "}...");
return "From HelloServiceBean :HELLO!! You just said :" + phrase;
}
}
Phase Two??”Component Packaging
We will now have two Service Units??”one a SE and the other a BC. Both these
Service Units will be packaged into a single Service Assembly so that we can deploy
them into the ESB.
Pages:
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193