Prev | Current Page 216 | Next

Binildas A Christudas

"Service-Oriented Java Business Integration"

Other than this, we don't have any explicit referral to EJB
classes in the ServiceMix binding above. What you're seeing is Spring's success in
abstracting away the client side of the clunky EJB contract. However, the home and
remote interfaces are still required??”Spring is using them under the hood, just as
you would if you had to write the JNDI lookup, EJB home, and create calls yourself.
What Spring is doing behind the scenes is making a JNDI lookup for the home, then
calling the create() method on the home and enabling you to work with that. That
is why we require the EJB client jar in the classpath.
We have seen previously, how we configured jndiTemplate by explicitly referring
the weblogic.jndi.WLInitialContextFactory. This is included in weblogic.jar
and hence we include that jar in the ServiceMix's optional library folder too. In case
you are using a different EJB server and you use a different java.naming.factory.
initial class, then include the respective jars in ServiceMix's optional library
folder too. To build, execute ant as shown in the following code:
cd ch08\BindEjb\02_BindInEsb
ant
Binding EJB in a JBI Container
[ 156 ]
Now, bring up the ServiceMix container by executing the servicemix.


Pages:
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228