narrow(contxt.
lookup(jndiName), Class.forName(homeInterfaceName));
Method createMethod = home.getClass().
getMethod("create", new Class[0]);
remoteObjRef = (EJBObject) createMethod.invoke((Object) home,
new Object[0]);
During actual method invocation StatelessEJBProvider will execute the
following code:
Method m = MethodUtils.getMethod (remoteObjRef,
methodName, argTypes);
Bean result = new Bean (m.getReturnType (),
m.invoke (remoteObjRef, args));
Running the Sample
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.
Running the sample involves multiple steps, as shown as follows:
Deploying the EJB
For deploying the EJB, we have to follow general EJB deployment steps as specified
in the Weblogic documentation.
Since you are building your first EJB sample in this book, we will spend a little
more time to help you to deploy your EJB sample.
Pages:
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149