1 | <!--
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | -->
|
---|
17 | <html>
|
---|
18 |
|
---|
19 | <head>
|
---|
20 | <meta http-equiv="Content-Language" content="en-us">
|
---|
21 | <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
---|
22 | <title>EJB Tasks</title>
|
---|
23 |
|
---|
24 | </head>
|
---|
25 |
|
---|
26 | <body>
|
---|
27 |
|
---|
28 | <h1>Ant EJB Tasks User Manual</h1>
|
---|
29 | <p>by</p>
|
---|
30 | <!-- Names are in alphabetical order, on last name -->
|
---|
31 | <ul>
|
---|
32 | <li>Paul Austin (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
33 | <li>Holger Engels (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
34 | <li>Tim Fennell (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
35 | <li>Martin Gee (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
36 | <li>Conor MacNeill</li>
|
---|
37 | <li>Cyrille Morvan (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
38 | <li>Greg Nelson (<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
39 | <li>Rob van Oostrum(<a href="mailto:[email protected]">[email protected]</a>)</li>
|
---|
40 | </ul>
|
---|
41 |
|
---|
42 | <hr>
|
---|
43 | <h2>Table of Contents</h2>
|
---|
44 | <ul>
|
---|
45 | <li><a href="#introduction">Introduction</a></li>
|
---|
46 | <li><a href="#ejbtasks">EJB Tasks</a></li>
|
---|
47 | </ul>
|
---|
48 |
|
---|
49 | <hr>
|
---|
50 | <h2><a name="introduction">Introduction</a></h2>
|
---|
51 | <p>Ant provides a number of optional tasks for developing 1.x and 2.x
|
---|
52 | <a href="http://java.sun.com/products/ejb" target="_top">Enterprise Java Beans (EJBs)</a>.
|
---|
53 | In general these tasks are specific to the particular vendor's EJB Server.</p>
|
---|
54 |
|
---|
55 | <p> The tasks support:<br>
|
---|
56 |
|
---|
57 | <ul>
|
---|
58 | <li><a href="http://www.borland.com">Borland </a>
|
---|
59 | Application Server 4.5</li>
|
---|
60 | <li><a href="http://www.iplanet.com">iPlanet </a>
|
---|
61 | Application Server 6.0</li>
|
---|
62 | <li><a href="http://www.jboss.org/" target="_top">
|
---|
63 | JBoss 2.1</a> and above EJB servers</li>
|
---|
64 | <li><a href="http://www.bea.com" target="_top">Weblogic</a>
|
---|
65 | 4.5.1 through to 7.0 EJB servers</li>
|
---|
66 | <li><a href="http://www.objectweb.org/jonas/" target="_top">JOnAS</a>
|
---|
67 | 2.4.x and 2.5 Open Source EJB server</li>
|
---|
68 | <li><a href="http://www.ibm.com/websphere">IBM WebSphere</a> 4.0</li>
|
---|
69 | </ul>
|
---|
70 | Vendors such as BEA and IBM now provide custom Ant tasks to work with their
|
---|
71 | particular products. More importantly, EJB3.0 renders this whole process obsolete.
|
---|
72 | Accordingly, developement of these tasks is effectively frozen. Bug reports
|
---|
73 | and especially patches are welcome, but there is no pressing need to add
|
---|
74 | support for new application servers. Nobody should be writing new EJB2.x applications
|
---|
75 | and definitely not new EJB2.x servers.
|
---|
76 | </p>
|
---|
77 |
|
---|
78 | <hr>
|
---|
79 | <h2><a name="ejbtasks">EJB Tasks</a></h2>
|
---|
80 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
81 | <tr><td>Task</td><td colspan="2">Application Servers</td></tr>
|
---|
82 | <tr><td><a href="BorlandGenerateClient.html">blgenclient</a></td><td colspan="2">Borland Application Server 4.5 and 5.x</td></tr>
|
---|
83 | <tr><td><a href="#ddcreator">ddcreator</a></td><td colspan="2">Weblogic 4.5.1</td></tr>
|
---|
84 | <tr><td><a href="#ejbc">ejbc</a></td><td colspan="2">Weblogic 4.5.1</td></tr>
|
---|
85 | <tr><td><a href="#iplanet-ejbc">iplanet-ejbc</a></td><td colspan="2">iPlanet Application Server 6.0</td></tr>
|
---|
86 | <tr><td rowspan="7"><a href="#ejbjar">ejbjar</a></td><td colspan="2" align="center"><b>Nested Elements</b></td></tr>
|
---|
87 | <tr><td><a href="BorlandEJBTasks.html">borland</a></td><td>Borland Application Server 4.5 and 5.x</td></tr>
|
---|
88 | <tr><td><a href="#ejbjar_iplanet">iPlanet</a></td><td>iPlanet Application Server 6.0</td></tr>
|
---|
89 | <tr><td><a href="#ejbjar_jboss">jboss</a></td><td>JBoss</td></tr>
|
---|
90 | <tr><td><a href="#ejbjar_jonas">jonas</a></td><td>JOnAS 2.4.x and 2.5</td></tr>
|
---|
91 | <tr><td><a href="#ejbjar_weblogic">weblogic</a></td><td>Weblogic 5.1 to 7.0</td></tr>
|
---|
92 | <tr><td><a href="#ejbjar_websphere">websphere</a></td><td>IBM WebSphere 4.0</td></tr>
|
---|
93 | <tr><td><a href="#wlrun">wlrun</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr>
|
---|
94 | <tr><td><a href="#wlstop">wlstop</a></td><td colspan="2">Weblogic 4.5.1 to 7.0</td></tr>
|
---|
95 |
|
---|
96 | </table>
|
---|
97 |
|
---|
98 | <hr>
|
---|
99 | <h2><a name="ddcreator">ddcreator</a></h2>
|
---|
100 | <h3><b>Description:</b></h3>
|
---|
101 | <p>ddcreator will compile a set of Weblogic text-based deployment descriptors into a serialized
|
---|
102 | EJB deployment descriptor. The selection of which of the text-based descriptors are to be compiled
|
---|
103 | is based on the standard Ant include and exclude selection mechanisms.
|
---|
104 | </p>
|
---|
105 |
|
---|
106 | <h3>Parameters:</h3>
|
---|
107 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
108 | <tr>
|
---|
109 | <td valign="top"><b>Attribute</b></td>
|
---|
110 | <td valign="top"><b>Description</b></td>
|
---|
111 | <td align="center" valign="top"><b>Required</b></td>
|
---|
112 | </tr>
|
---|
113 | <tr>
|
---|
114 | <td valign="top">descriptors</td>
|
---|
115 | <td valign="top">This is the base directory from which descriptors are selected.</td>
|
---|
116 | <td valign="top" align="center">Yes</td>
|
---|
117 | </tr>
|
---|
118 | <tr>
|
---|
119 | <td valign="top">dest</td>
|
---|
120 | <td valign="top">The directory where the serialized deployment descriptors will be written</td>
|
---|
121 | <td valign="top" align="center">Yes</td>
|
---|
122 | </tr>
|
---|
123 | <tr>
|
---|
124 | <td valign="top">classpath</td>
|
---|
125 | <td valign="top">This is the classpath to use to run the underlying weblogic ddcreator tool.
|
---|
126 | This must include the <code>weblogic.ejb.utils.DDCreator</code> class</td>
|
---|
127 | <td valign="top" align="center">No</td>
|
---|
128 | </tr>
|
---|
129 | </table>
|
---|
130 | <h3>Examples</h3>
|
---|
131 | <pre>
|
---|
132 | <ddcreator descriptors="${dd.dir}"
|
---|
133 | dest="${gen.classes}"
|
---|
134 | classpath="${descriptorbuild.classpath}">
|
---|
135 | <include name="*.txt"/>
|
---|
136 | </ddcreator>
|
---|
137 | </pre>
|
---|
138 |
|
---|
139 | <hr>
|
---|
140 | <h2><a name="ejbc">ejbc</a></h2>
|
---|
141 | <h3><b>Description:</b></h3>
|
---|
142 | <p>The ejbc task will run Weblogic's ejbc tool. This tool will take a serialized deployment descriptor,
|
---|
143 | examine the various EJB interfaces and bean classes and then generate the required support classes
|
---|
144 | necessary to deploy the bean in a Weblogic EJB container. This will include the RMI stubs and skeletons
|
---|
145 | as well as the classes which implement the bean's home and remote interfaces.</p>
|
---|
146 | <p>
|
---|
147 | The ant task which runs this tool is able to compile several beans in a single operation. The beans to be
|
---|
148 | compiled are selected by including their serialized deployment descriptors. The standard ant
|
---|
149 | <code>include</code> and <code>exclude</code> constructs can be used to select the deployment descriptors
|
---|
150 | to be included. </p>
|
---|
151 | <p>
|
---|
152 | Each descriptor is examined to determine whether the generated classes are out of date and need to be
|
---|
153 | regenerated. The deployment descriptor is de-serialized to discover the home, remote and
|
---|
154 | implementation classes. The corresponding source files are determined and checked to see their
|
---|
155 | modification times. These times and the modification time of the serialized descriptor itself are
|
---|
156 | compared with the modification time of the generated classes. If the generated classes are not present
|
---|
157 | or are out of date, the ejbc tool is run to generate new versions.</p>
|
---|
158 | <h3>Parameters:</h3>
|
---|
159 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
160 | <tr>
|
---|
161 | <td valign="top"><b>Attribute</b></td>
|
---|
162 | <td valign="top"><b>Description</b></td>
|
---|
163 | <td align="center" valign="top"><b>Required</b></td>
|
---|
164 | </tr>
|
---|
165 | <tr>
|
---|
166 | <td valign="top">descriptors</td>
|
---|
167 | <td valign="top">This is the base directory from which the serialized deployment descriptors are selected.</td>
|
---|
168 | <td valign="top" align="center">Yes</td>
|
---|
169 | </tr>
|
---|
170 | <tr>
|
---|
171 | <td valign="top">dest</td>
|
---|
172 | <td valign="top">The base directory where the generated classes, RIM stubs and RMI skeletons are written</td>
|
---|
173 | <td valign="top" align="center">Yes</td>
|
---|
174 | </tr>
|
---|
175 | <tr>
|
---|
176 | <td valign="top">manifest</td>
|
---|
177 | <td valign="top">The name of a manifest file to be written. This manifest will contain an entry for each EJB processed</td>
|
---|
178 | <td valign="top" align="center">Yes</td>
|
---|
179 | </tr>
|
---|
180 | <tr>
|
---|
181 | <td valign="top">src</td>
|
---|
182 | <td valign="top">The base directory of the source tree containing the source files of the home interface,
|
---|
183 | remote interface and bean implementation classes.</td>
|
---|
184 | <td valign="top" align="center">Yes</td>
|
---|
185 | </tr>
|
---|
186 | <tr>
|
---|
187 | <td valign="top">classpath</td>
|
---|
188 | <td valign="top">This classpath must include both the <code>weblogic.ejbc</code> class and the
|
---|
189 | class files of the bean, home interface, remote interface, etc of the bean being
|
---|
190 | processed.</td>
|
---|
191 | <td valign="top" align="center">No</td>
|
---|
192 | </tr>
|
---|
193 | <tr>
|
---|
194 | <td valign="top">keepgenerated</td>
|
---|
195 | <td>Controls whether ejbc will keep the
|
---|
196 | intermediate Java files used to build the class files. This can be
|
---|
197 | useful when debugging.</td>
|
---|
198 | <td>No, defaults to false.</td>
|
---|
199 | </tr>
|
---|
200 | </table>
|
---|
201 | <h3>Examples</h3>
|
---|
202 | <pre>
|
---|
203 | <ejbc descriptors="${gen.classes}"
|
---|
204 | src="${src.dir}"
|
---|
205 | dest="${gen.classes}"
|
---|
206 | manifest="${build.manifest}"
|
---|
207 | classpath="${descriptorbuild.classpath}">
|
---|
208 | <include name="*.ser"/>
|
---|
209 | </ejbc>
|
---|
210 | </pre>
|
---|
211 |
|
---|
212 | <hr>
|
---|
213 | <h2>
|
---|
214 | <a NAME="iplanet-ejbc"></a>iplanet-ejbc</h2>
|
---|
215 |
|
---|
216 | <h3>
|
---|
217 | <b>Description:</b></h3>
|
---|
218 | Task to compile EJB stubs and skeletons for the iPlanet Application Server
|
---|
219 | 6.0. Given a standard EJB 1.1 XML descriptor as well as an iAS-specific
|
---|
220 | EJB descriptor, this task will generate the stubs and skeletons required
|
---|
221 | to deploy the EJB to iAS. Since the XML descriptors can include multiple
|
---|
222 | EJBs, this is a convenient way of specifying many EJBs in a single Ant
|
---|
223 | task.
|
---|
224 | <p>For each EJB specified, the task will locate the three classes that
|
---|
225 | comprise the EJB in the destination directory. If these class files
|
---|
226 | cannot be located in the destination directory, the task will fail. The
|
---|
227 | task will also attempt to locate the EJB stubs and skeletons in this directory.
|
---|
228 | If found, the timestamps on the stubs and skeletons will be checked to
|
---|
229 | ensure they are up to date. Only if these files cannot be found or if they
|
---|
230 | are out of date will the iAS ejbc utility be called to generate new stubs
|
---|
231 | and skeletons.</p>
|
---|
232 | <h3>
|
---|
233 | Parameters:</h3>
|
---|
234 |
|
---|
235 | <table border="1" cellspacing="0" cellpadding="2">
|
---|
236 | <tr>
|
---|
237 | <td valign="top"><b>Attribute</b></td>
|
---|
238 |
|
---|
239 | <td valign="top"><b>Description</b></td>
|
---|
240 |
|
---|
241 | <td align="center" valign="top"><b>Required</b></td>
|
---|
242 | </tr>
|
---|
243 |
|
---|
244 | <tr>
|
---|
245 | <td valign="top">ejbdescriptor</td>
|
---|
246 |
|
---|
247 | <td valign="top">Standard EJB 1.1 XML descriptor (typically titled "ejb-jar.xml").</td>
|
---|
248 |
|
---|
249 | <td align="center" valign="top">Yes</td>
|
---|
250 | </tr>
|
---|
251 |
|
---|
252 | <tr>
|
---|
253 | <td valign="top">iasdescriptor</td>
|
---|
254 |
|
---|
255 | <td valign="top">iAS-specific EJB XML descriptor (typically titled "ias-ejb-jar.xml").</td>
|
---|
256 |
|
---|
257 | <td align="center" valign="top">Yes</td>
|
---|
258 | </tr>
|
---|
259 |
|
---|
260 | <tr>
|
---|
261 | <td valign="top">dest</td>
|
---|
262 |
|
---|
263 | <td valign="top">The is the base directory where the RMI stubs and skeletons
|
---|
264 | are written. In addition, the class files for each bean (home interface,
|
---|
265 | remote interface, and EJB implementation) must be found in this directory.</td>
|
---|
266 |
|
---|
267 | <td align="center" valign="top">Yes</td>
|
---|
268 | </tr>
|
---|
269 |
|
---|
270 | <tr>
|
---|
271 | <td valign="top">classpath</td>
|
---|
272 |
|
---|
273 | <td valign="top">The classpath used when generating EJB stubs and skeletons.
|
---|
274 | If omitted, the classpath specified when Ant was started will be used.
|
---|
275 | Nested "classpath" elements may also be used.</td>
|
---|
276 |
|
---|
277 | <td align="center" valign="top">No</td>
|
---|
278 | </tr>
|
---|
279 |
|
---|
280 | <tr>
|
---|
281 | <td valign="top">keepgenerated</td>
|
---|
282 |
|
---|
283 | <td valign="top">Indicates whether or not the Java source files which are
|
---|
284 | generated by ejbc will be saved or automatically deleted. If "yes", the
|
---|
285 | source files will be retained. If omitted, it defaults to "no". </td>
|
---|
286 |
|
---|
287 | <td align="center" valign="top">No</td>
|
---|
288 | </tr>
|
---|
289 |
|
---|
290 | <tr>
|
---|
291 | <td valign="top">debug</td>
|
---|
292 |
|
---|
293 | <td>Indicates whether or not the ejbc utility should log additional debugging
|
---|
294 | statements to the standard output. If "yes", the additional debugging statements
|
---|
295 | will be generated. If omitted, it defaults to "no". </td>
|
---|
296 |
|
---|
297 | <td align="center" valign="top">
|
---|
298 | <center>No</center>
|
---|
299 | </td>
|
---|
300 | </tr>
|
---|
301 |
|
---|
302 | <tr>
|
---|
303 | <td valign="top">iashome</td>
|
---|
304 |
|
---|
305 | <td>May be used to specify the "home" directory for this iAS installation.
|
---|
306 | This is used to find the ejbc utility if it isn't included in the user's
|
---|
307 | system path. If specified, it should refer to the "[install-location]/iplanet/ias6/ias"
|
---|
308 | directory. If omitted, the ejbc utility must be on the user's system path. </td>
|
---|
309 |
|
---|
310 | <td align="center" valign="top">No</td>
|
---|
311 | </tr>
|
---|
312 | </table>
|
---|
313 |
|
---|
314 | <h3>
|
---|
315 | Examples</h3>
|
---|
316 |
|
---|
317 | <pre>
|
---|
318 | <iplanet-ejbc ejbdescriptor="ejb-jar.xml"
|
---|
319 | iasdescriptor="ias-ejb-jar.xml"
|
---|
320 | dest="${build.classesdir}"
|
---|
321 | classpath="${ias.ejbc.cpath}"/>
|
---|
322 |
|
---|
323 |
|
---|
324 | <iplanet-ejbc ejbdescriptor="ejb-jar.xml"
|
---|
325 | iasdescriptor="ias-ejb-jar.xml"
|
---|
326 | dest="${build.classesdir}"
|
---|
327 | keepgenerated="yes"
|
---|
328 | debug="yes"
|
---|
329 | iashome="${ias.home}">
|
---|
330 | <classpath>
|
---|
331 | <pathelement path="."/>
|
---|
332 | <pathelement path="${build.classpath}"/>
|
---|
333 | </classpath>
|
---|
334 | </iplanet-ejbc>
|
---|
335 |
|
---|
336 |
|
---|
337 | </pre>
|
---|
338 |
|
---|
339 | <hr>
|
---|
340 | <h2><a name="wlrun">wlrun</a></h2>
|
---|
341 | <h3><b>Description:</b></h3>
|
---|
342 |
|
---|
343 | <p>The <code>wlrun</code> task is used to start a weblogic server. The task runs
|
---|
344 | a weblogic instance in a separate Java Virtual Machine. A number of parameters
|
---|
345 | are used to control the operation of the weblogic instance. Note that the task,
|
---|
346 | and hence ant, will not complete until the weblogic instance is stopped.</p>
|
---|
347 |
|
---|
348 | <h3>Parameters:</h3>
|
---|
349 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
350 | <tr>
|
---|
351 | <td valign="top"><b>Attribute</b></td>
|
---|
352 | <td valign="top"><b>Description</b></td>
|
---|
353 | <td align="center" valign="top"><b>Required for 4.5.1 and 5.1</b></td>
|
---|
354 | <td align="center" valign="top"><b>Required for 6.0</b></td>
|
---|
355 | </tr>
|
---|
356 | <tr>
|
---|
357 | <td valign="top">BEA Home</td>
|
---|
358 | <td valign="top">The location of the BEA Home where the server's config is defined.
|
---|
359 | If this attribute is present, wlrun assumes that the server will
|
---|
360 | be running under Weblogic 6.0</td>
|
---|
361 | <td valign="top" align="center">N/A</td>
|
---|
362 | <td valign="top" align="center">Yes</td>
|
---|
363 | </tr>
|
---|
364 | <tr>
|
---|
365 | <td valign="top">home</td>
|
---|
366 | <td valign="top">The location of the weblogic home that is to be used. This is the location
|
---|
367 | where weblogic is installed.</td>
|
---|
368 | <td valign="top" align="center">Yes</td>
|
---|
369 | <td valign="top" align="center">Yes. Note this is the absolute location, not relative to
|
---|
370 | BEA home.</td>
|
---|
371 | </tr>
|
---|
372 | <tr>
|
---|
373 | <td valign="top">Domain</td>
|
---|
374 | <td valign="top">The domain to which the server belongs.</td>
|
---|
375 | <td valign="top" align="center">N/A</td>
|
---|
376 | <td valign="top" align="center">Yes</td>
|
---|
377 | </tr>
|
---|
378 | <tr>
|
---|
379 | <td valign="top">classpath</td>
|
---|
380 | <td valign="top">The classpath to be used with the Java Virtual Machine that runs the Weblogic
|
---|
381 | Server. Prior to Weblogic 6.0, this is typically set to the Weblogic
|
---|
382 | boot classpath. Under Weblogic 6.0 this should include all the
|
---|
383 | weblogic jars</td>
|
---|
384 | <td valign="top" align="center">Yes</td>
|
---|
385 | <td valign="top" align="center">Yes</td>
|
---|
386 | </tr>
|
---|
387 | <tr>
|
---|
388 | <td valign="top">wlclasspath</td>
|
---|
389 | <td valign="top">The weblogic classpath used by the Weblogic Server.</td>
|
---|
390 | <td valign="top" align="center">No</td>
|
---|
391 | <td valign="top" align="center">N/A</td>
|
---|
392 | </tr>
|
---|
393 | <tr>
|
---|
394 | <td valign="top">properties</td>
|
---|
395 | <td valign="top">The name of the server's properties file within the weblogic home directory
|
---|
396 | used to control the weblogic instance.</td>
|
---|
397 | <td valign="top" align="center">Yes</td>
|
---|
398 | <td valign="top" align="center">N/A</td>
|
---|
399 | </tr>
|
---|
400 | <tr>
|
---|
401 | <td valign="top">name</td>
|
---|
402 | <td valign="top">The name of the weblogic server within the weblogic home which is to be run.
|
---|
403 | This defaults to "myserver"</td>
|
---|
404 | <td valign="top" align="center">No</td>
|
---|
405 | <td valign="top" align="center">No</td>
|
---|
406 | </tr>
|
---|
407 | <tr>
|
---|
408 | <td valign="top">policy</td>
|
---|
409 | <td valign="top">The name of the security policy file within the weblogic home directory that
|
---|
410 | is to be used. If not specified, the default policy file <code>weblogic.policy</code>
|
---|
411 | is used.</td>
|
---|
412 | <td valign="top" align="center">No</td>
|
---|
413 | <td valign="top" align="center">No</td>
|
---|
414 | </tr>
|
---|
415 | <tr>
|
---|
416 | <td valign="top">username</td>
|
---|
417 | <td valign="top">The management username used to manage the server</td>
|
---|
418 | <td valign="top" align="center">N/A</td>
|
---|
419 | <td valign="top" align="center">No</td>
|
---|
420 | </tr>
|
---|
421 | <tr>
|
---|
422 | <td valign="top">password</td>
|
---|
423 | <td valign="top">The server's management password</td>
|
---|
424 | <td valign="top" align="center">N/A</td>
|
---|
425 | <td valign="top" align="center">Yes</td>
|
---|
426 | </tr>
|
---|
427 | <tr>
|
---|
428 | <td valign="top">pkPassword</td>
|
---|
429 | <td valign="top">The private key password so the server can decrypt the SSL
|
---|
430 | private key file</td>
|
---|
431 | <td valign="top" align="center">N/A</td>
|
---|
432 | <td valign="top" align="center">No</td>
|
---|
433 | </tr>
|
---|
434 | <tr>
|
---|
435 | <td valign="top">jvmargs</td>
|
---|
436 | <td valign="top">Additional argument string passed to the Java Virtual Machine used to run the
|
---|
437 | Weblogic instance.</td>
|
---|
438 | <td valign="top" align="center">No</td>
|
---|
439 | <td valign="top" align="center">No</td>
|
---|
440 | </tr>
|
---|
441 | <tr>
|
---|
442 | <td valign="top">weblogicMainClass</td>
|
---|
443 | <td valign="top">name of the main class for weblogic</td>
|
---|
444 | <td valign="top" align="center">No</td>
|
---|
445 | <td valign="top" align="center">No</td>
|
---|
446 | </tr>
|
---|
447 | </table>
|
---|
448 |
|
---|
449 | <h3>Nested Elements</h3>
|
---|
450 |
|
---|
451 | <p>The wlrun task supports nested <code><classpath></code> and <code><wlclasspath></code>
|
---|
452 | elements to set the respective classpaths.</p>
|
---|
453 |
|
---|
454 | <h3>Examples</h3>
|
---|
455 |
|
---|
456 | <p>This example shows the use of wlrun to run a server under Weblogic 5.1</p>
|
---|
457 |
|
---|
458 | <pre>
|
---|
459 | <wlrun taskname="myserver"
|
---|
460 | classpath="${weblogic.boot.classpath}"
|
---|
461 | wlclasspath="${weblogic.classes}:${code.jars}"
|
---|
462 | name="myserver"
|
---|
463 | home="${weblogic.home}"
|
---|
464 | properties="myserver/myserver.properties"/>
|
---|
465 | </pre>
|
---|
466 |
|
---|
467 | <p>This example shows wlrun being used to run the petstore server under
|
---|
468 | Weblogic 6.0</p>
|
---|
469 |
|
---|
470 | <pre>
|
---|
471 | <wlrun taskname="petstore"
|
---|
472 | classpath="${weblogic.classes}"
|
---|
473 | name="petstoreServer"
|
---|
474 | domain="petstore"
|
---|
475 | home="${weblogic.home}"
|
---|
476 | password="petstorePassword"
|
---|
477 | beahome="${bea.home}"/>
|
---|
478 | </pre>
|
---|
479 |
|
---|
480 | <hr>
|
---|
481 | <h2><a name="wlstop">wlstop</a></h2>
|
---|
482 | <h3><b>Description:</b></h3>
|
---|
483 |
|
---|
484 | <p>The <code>wlstop</code> task is used to stop a weblogic instance which is
|
---|
485 | currently running. To shut down an instance you must supply both a username and
|
---|
486 | a password. These will be stored in the clear in the build script used to stop
|
---|
487 | the instance. For security reasons, this task is therefore only appropriate in a
|
---|
488 | development environment. </p>
|
---|
489 |
|
---|
490 | <p>This task works for most version of Weblogic, including 6.0. You need to
|
---|
491 | specify the BEA Home to have this task work correctly under 6.0</p>
|
---|
492 |
|
---|
493 | <h3>Parameters:</h3>
|
---|
494 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
495 | <tr>
|
---|
496 | <td valign="top"><b>Attribute</b></td>
|
---|
497 | <td valign="top"><b>Description</b></td>
|
---|
498 | <td align="center" valign="top"><b>Required</b></td>
|
---|
499 | </tr>
|
---|
500 | <tr>
|
---|
501 | <td valign="top">BEAHome</td>
|
---|
502 | <td valign="top">This attribute selects Weblogic 6.0 shutdown.</td>
|
---|
503 | <td valign="top" align="center">No</td>
|
---|
504 | </tr>
|
---|
505 | <tr>
|
---|
506 | <td valign="top">classpath</td>
|
---|
507 | <td valign="top">The classpath to be used with the Java Virtual Machine that runs the Weblogic
|
---|
508 | Shutdown command.</td>
|
---|
509 | <td valign="top" align="center">Yes</td>
|
---|
510 | </tr>
|
---|
511 | <tr>
|
---|
512 | <td valign="top">user</td>
|
---|
513 | <td valign="top">The username of the account which will be used to shutdown the server</td>
|
---|
514 | <td valign="top" align="center">Yes</td>
|
---|
515 | </tr>
|
---|
516 | <tr>
|
---|
517 | <td valign="top">password</td>
|
---|
518 | <td valign="top">The password for the account specified in the user parameter.</td>
|
---|
519 | <td valign="top" align="center">Yes</td>
|
---|
520 | </tr>
|
---|
521 | <tr>
|
---|
522 | <td valign="top">url</td>
|
---|
523 | <td valign="top">The URL which describes the port to which the server is listening for T3 connections.
|
---|
524 | For example, t3://localhost:7001</td>
|
---|
525 | <td valign="top" align="center">Yes</td>
|
---|
526 | </tr>
|
---|
527 | <tr>
|
---|
528 | <td valign="top">delay</td>
|
---|
529 | <td valign="top">The delay in seconds after which the server will stop. This defaults to an
|
---|
530 | immediate shutdown.</td>
|
---|
531 | <td valign="top" align="center">No</td>
|
---|
532 | </tr>
|
---|
533 | </table>
|
---|
534 |
|
---|
535 | <h3>Nested Element</h3>
|
---|
536 |
|
---|
537 | <p>The classpath of the wlstop task can be set by a <code><classpath></code> nested element.</p>
|
---|
538 |
|
---|
539 | <h3>Examples</h3>
|
---|
540 |
|
---|
541 | <p>This example show the shutdown for a Weblogic 6.0 server</p>
|
---|
542 |
|
---|
543 | <pre>
|
---|
544 | <wlstop classpath="${weblogic.classes}"
|
---|
545 | user="system"
|
---|
546 | url="t3://localhost:7001"
|
---|
547 | password="foobar"
|
---|
548 | beahome="${bea.home}"/>
|
---|
549 | </pre>
|
---|
550 |
|
---|
551 | <hr>
|
---|
552 |
|
---|
553 | <h2><a name="ejbjar">ejbjar</a></h2>
|
---|
554 | <h3><b>Description:</b></h3>
|
---|
555 |
|
---|
556 | <p>This task is designed to support building of EJB jar files (EJB 1.1 & 2.0).
|
---|
557 | Support is currently provided for 'vanilla' EJB jar files - i.e. those containing only
|
---|
558 | the user generated class files and the standard deployment descriptor. Nested
|
---|
559 | elements provide support for vendor specific deployment tools. These currently
|
---|
560 | include: </p>
|
---|
561 | <ul>
|
---|
562 | <li>Borland Application Server 4.5</li>
|
---|
563 | <li>iPlanet Application Server 6.0</li>
|
---|
564 | <li>JBoss 2.1 and above</li>
|
---|
565 | <li>Weblogic 5.1/6.0 session/entity beans using the weblogic.ejbc tool</li>
|
---|
566 | <li>IBM WebSphere 4.0</li>
|
---|
567 | <li>TOPLink for WebLogic 2.5.1-enabled entity beans</li>
|
---|
568 | <li><a href="http://www.objectweb.org/jonas/">JOnAS</a> 2.4.x and 2.5 Open Source EJB server</li>
|
---|
569 | </ul>
|
---|
570 |
|
---|
571 |
|
---|
572 | <p>The task works as a directory scanning task, and performs an action for each
|
---|
573 | deployment descriptor found. As such the includes and excludes should be set
|
---|
574 | to ensure that all desired EJB descriptors are found, but no application
|
---|
575 | server descriptors are found. For each descriptor found, ejbjar will parse the
|
---|
576 | deployment descriptor to determine the necessary class files which implement the
|
---|
577 | bean. These files are assembled along with the deployment descriptors into a
|
---|
578 | well formed EJB jar file. Any support files which need to be included in the
|
---|
579 | generated jar can be added with the <code><support></code> nested element. For each
|
---|
580 | class included in the jar, ejbjar will scan for any super classes or super
|
---|
581 | interfaces. These will be added to the generated jar.</p>
|
---|
582 |
|
---|
583 | <p>If no nested vendor-specific deployment elements are present, the task will
|
---|
584 | simply generate a generic EJB jar. Such jars are typically used as the input to
|
---|
585 | vendor-specific deployment tools. For each nested deployment element, a vendor
|
---|
586 | specific deployment tool is run to generate a jar file ready for deployment in
|
---|
587 | that vendor's EJB container. </p>
|
---|
588 |
|
---|
589 | <p>The jar files are only built if they are out of date. Each deployment tool
|
---|
590 | element will examine its target jar file and determine if it is out of date with
|
---|
591 | respect to the class files and deployment descriptors that make up the bean. If
|
---|
592 | any of these files are newer than the jar file the jar will be rebuilt otherwise
|
---|
593 | a message is logged that the jar file is up to date.</p>
|
---|
594 |
|
---|
595 | <p>The task uses the
|
---|
596 | <a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> framework
|
---|
597 | to extract all dependent classes. This
|
---|
598 | means that, in addition to the classes that are mentioned in the
|
---|
599 | deployment descriptor, any classes that these depend on are also
|
---|
600 | automatically included in the jar file.</p>
|
---|
601 |
|
---|
602 |
|
---|
603 | <h3>Naming Convention</h3>
|
---|
604 |
|
---|
605 | Ejbjar handles the processing of multiple beans, and it uses a set of naming
|
---|
606 | conventions to determine the name of the generated EJB jars. The naming convention
|
---|
607 | that is used is controlled by the "naming" attribute. It supports the
|
---|
608 | following values
|
---|
609 | <ul>
|
---|
610 |
|
---|
611 | <li>descriptor</li>
|
---|
612 | <p>This is the default naming scheme. The name of the generated bean is derived from the
|
---|
613 | name of the deployment descriptor. For an Account bean, for example, the deployment
|
---|
614 | descriptor would be named <code>Account-ejb-jar.xml</code>. Vendor specific descriptors are
|
---|
615 | located using the same naming convention. The weblogic bean, for example, would be named
|
---|
616 | <code>Account-weblogic-ejb-jar.xml</code>. Under this arrangement, the deployment descriptors
|
---|
617 | can be separated from the code implementing the beans, which can be useful when the same bean code
|
---|
618 | is deployed in separate beans.
|
---|
619 | </p>
|
---|
620 |
|
---|
621 | <p>This scheme is useful when you are using one bean per EJB jar and where you may be
|
---|
622 | deploying the same bean classes in different beans, with different deployment characteristics.
|
---|
623 |
|
---|
624 | <li>ejb-name</li>
|
---|
625 | <p> This naming scheme uses the <code><ejb-name></code> element from the deployment descriptor to
|
---|
626 | determine the bean name. In this situation, the descriptors normally use the generic
|
---|
627 | descriptor names, such as <code>ejb-jar.xml</code> along with any associated vendor specific descriptor
|
---|
628 | names. For example, If the value of the <code><ejb-name></code> were to be given in the deployment descriptor
|
---|
629 | as follows:
|
---|
630 | <pre>
|
---|
631 | <ejb-jar>
|
---|
632 | <enterprise-beans>
|
---|
633 | <entity>
|
---|
634 | <ejb-name>Sample</ejb-name>
|
---|
635 | <home>org.apache.ant.ejbsample.SampleHome</home>
|
---|
636 | </pre>
|
---|
637 |
|
---|
638 | then the name of the generated bean would be <code>Sample.jar</code>
|
---|
639 | </p>
|
---|
640 | <p> This scheme is useful where you want to use the standard deployment descriptor names, which may be more
|
---|
641 | compatible with other EJB tools. This scheme must have one bean per jar.
|
---|
642 | </p>
|
---|
643 | <li>directory</li>
|
---|
644 | <p>
|
---|
645 | In this mode, the name of the generated bean jar is derived from the directory
|
---|
646 | containing the deployment descriptors. Again the deployment descriptors typically use
|
---|
647 | the standard filenames. For example, if the path to the deployment descriptor is
|
---|
648 | <code>/home/user/dev/appserver/dd/sample</code>, then the generated
|
---|
649 | bean will be named <code>sample.jar</code>
|
---|
650 | </p>
|
---|
651 | <p>
|
---|
652 | This scheme is also useful when you want to use standard style descriptor names. It is often
|
---|
653 | most useful when the descriptors are located in the same directory as the bean source code,
|
---|
654 | although that is not mandatory. This scheme can handle multiple beans per jar.
|
---|
655 | </p>
|
---|
656 |
|
---|
657 | <li>basejarname</li>
|
---|
658 | <p>
|
---|
659 | The final scheme supported by the <code><ejbjar></code> task is used when you want to specify the generated
|
---|
660 | bean jar name directly. In this case the name of the generated jar is specified by the
|
---|
661 | "basejarname" attribute. Since all generated beans will have the same name, this task should
|
---|
662 | be only used when each descriptor is in its own directory.
|
---|
663 | </p>
|
---|
664 |
|
---|
665 | <p>
|
---|
666 | This scheme is most appropriate when you are using multiple beans per jar and only process a single
|
---|
667 | deployment descriptor. You typically want to specify the name of the jar and not derive it from the
|
---|
668 | beans in the jar.
|
---|
669 | </p>
|
---|
670 |
|
---|
671 | </ul>
|
---|
672 |
|
---|
673 | <a name="ejbjar_deps"><h3>Dependencies</h3></a>
|
---|
674 | <p>In addition to the bean classes, ejbjar is able to ad additional classes to the generated
|
---|
675 | ejbjar. These classes are typically the support classes which are used by the bean's classes or as
|
---|
676 | parameters to the bean's methods.</p>
|
---|
677 |
|
---|
678 | <p>In versions of Ant prior to 1.5, ejbjar used reflection and attempted to add the super
|
---|
679 | classes and super interfaces of the bean classes. For this technique to work the bean
|
---|
680 | classes had to be loaded into Ant's JVM. This was not always possible due to class dependencies.
|
---|
681 | </p>
|
---|
682 |
|
---|
683 | <p>The ejbjar task in Ant releases 1.5 and later uses the
|
---|
684 | <a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> library
|
---|
685 | to analyze the bean's class
|
---|
686 | files directly, rather than loading them into the JVM. This also allows ejbjar to add all
|
---|
687 | of the required support classes for a bean and not just super classes.
|
---|
688 | </p>
|
---|
689 |
|
---|
690 | <p>In Ant 1.5, a new attribute, <code>dependency</code> has been introduced to allow the
|
---|
691 | buildfile to control what additional classes are added to the generated jar. It takes three
|
---|
692 | possible values</p>
|
---|
693 | <ul>
|
---|
694 | <li><code>none</code> - only the bean classes and interfaces described in the bean's
|
---|
695 | descriptor are added to the jar.</li>
|
---|
696 | <li><code>super</code> - this is the default value and replicates the original ejbjar
|
---|
697 | behaviour where super classes and super interfaces are added to the jar</li>
|
---|
698 | <li><code>full</code> - In this mode all classes used by the bean's classes and interfaces
|
---|
699 | are added to the jar</li>
|
---|
700 | </ul>
|
---|
701 | <p>The <code>super</code> and <code>full</code> values require the
|
---|
702 | <a href="http://jakarta.apache.org/bcel"> jakarta-BCEL </a> library
|
---|
703 | to be available. If it is not, ejbjar will drop back to the behaviour corresponding to
|
---|
704 | the value <code>none</code>.</p>
|
---|
705 |
|
---|
706 | <h3>Parameters:</h3>
|
---|
707 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
708 | <tr>
|
---|
709 | <td valign="top"><b>Attribute</b></td>
|
---|
710 | <td valign="top"><b>Description</b></td>
|
---|
711 | <td align="center" valign="top"><b>Required</b></td>
|
---|
712 | </tr>
|
---|
713 | <tr>
|
---|
714 | <td valign="top">descriptordir</td>
|
---|
715 | <td valign="top">The base directory under which to scan for EJB
|
---|
716 | deployment descriptors. If this attribute is not
|
---|
717 | specified, then the deployment descriptors must be
|
---|
718 | located in the directory specified by the 'srcdir'
|
---|
719 | attribute.</td>
|
---|
720 | <td valign="top" align="center">No</td>
|
---|
721 | </tr>
|
---|
722 | <tr>
|
---|
723 | <td valign="top">srcdir</td>
|
---|
724 | <td valign="top">The base directory containing the .class files that
|
---|
725 | make up the bean. Included are the home- remote- pk-
|
---|
726 | and implementation- classes and all classes, that these
|
---|
727 | depend on. Note that this can be the same as the
|
---|
728 | descriptordir if all files are in the same directory
|
---|
729 | tree.</td>
|
---|
730 | <td valign="top" align="center">Yes</td>
|
---|
731 | </tr>
|
---|
732 | <tr>
|
---|
733 | <td valign="top">destdir</td>
|
---|
734 | <td valign="top">The base directory into which generated jar files are
|
---|
735 | deposited. Jar files are deposited in directories
|
---|
736 | corresponding to their location within the descriptordir
|
---|
737 | namespace. Note that this attribute is only used if the
|
---|
738 | task is generating generic jars (i.e. no vendor-specific
|
---|
739 | deployment elements have been specified).</td>
|
---|
740 | <td valign="top" align="center">Yes, unless vendor-specific deployment elements
|
---|
741 | have been specified.</td>
|
---|
742 | </tr>
|
---|
743 | <tr>
|
---|
744 | <td valign="top">cmpversion</td>
|
---|
745 | <td valign="top">Either <code>1.0</code> or <code>2.0</code>.<br>
|
---|
746 | Default is <code>1.0</code>.<br>
|
---|
747 | A CMP 2.0 implementation exists currently only for JBoss.</td>
|
---|
748 | <td valign="top" align="center">No</td>
|
---|
749 | </tr>
|
---|
750 | <tr>
|
---|
751 | <td valign="top">naming</td>
|
---|
752 | <td valign="top">Controls the naming convention used to name generated
|
---|
753 | EJB jars. Please refer to the description above.</td>
|
---|
754 | <td valign="top" align="center">No</td>
|
---|
755 | </tr>
|
---|
756 | <tr>
|
---|
757 | <td valign="top">basejarname</td>
|
---|
758 | <td valign="top">The base name that is used for the generated jar files.
|
---|
759 | If this attribute is specified, the generic jar file name
|
---|
760 | will use this value as the prefix (followed by the value
|
---|
761 | specified in the 'genericjarsuffix' attribute) and the
|
---|
762 | resultant ejb jar file (followed by any suffix specified
|
---|
763 | in the nested element).</td>
|
---|
764 | <td valign="top" align="center">No</td>
|
---|
765 | </tr>
|
---|
766 | <tr>
|
---|
767 | <td valign="top">basenameterminator</td>
|
---|
768 | <td valign="top">String value used to substring out a string from the name
|
---|
769 | of each deployment descriptor found, which is then used to
|
---|
770 | locate related deployment descriptors (e.g. the WebLogic
|
---|
771 | descriptors). For example, a basename of '.' and a
|
---|
772 | deployment descriptor called 'FooBean.ejb-jar.xml' would
|
---|
773 | result in a basename of 'FooBean' which would then be used
|
---|
774 | to find FooBean.weblogic-ejb-jar.xml and
|
---|
775 | FooBean.weblogic-cmp-rdbms-jar.xml, as well as to create
|
---|
776 | the filenames of the jar files as FooBean-generic.jar and
|
---|
777 | FooBean-wl.jar. This attribute is not used if the
|
---|
778 | 'basejarname' attribute is specified.</td>
|
---|
779 | <td valign="top" align="center">No, defaults to '-'.</td>
|
---|
780 | </tr>
|
---|
781 | <tr>
|
---|
782 | <td valign="top">genericjarsuffix</td>
|
---|
783 | <td valign="top">String value appended to the basename of the deployment
|
---|
784 | descriptor to create the filename of the generic EJB jar
|
---|
785 | file.</td>
|
---|
786 | <td valign="top" align="center">No, defaults to '-generic.jar'.</td>
|
---|
787 | </tr>
|
---|
788 | <tr>
|
---|
789 | <td valign="top">classpath</td>
|
---|
790 | <td valign="top">This classpath is used when resolving classes which
|
---|
791 | are to be added to the jar. Typically nested deployment
|
---|
792 | tool elements will also support a classpath which
|
---|
793 | will be combined with this classpath when resolving
|
---|
794 | classes</td>
|
---|
795 | <td valign="top" align="center">No.</td>
|
---|
796 | </tr>
|
---|
797 | <tr>
|
---|
798 | <td valign="top">flatdestdir</td>
|
---|
799 | <td valign="top">Set this attribute to true if you want all generated jars
|
---|
800 | to be placed in the root of the destdir, rather than
|
---|
801 | according to the location of the deployment descriptor
|
---|
802 | within the descriptor dir hierarchy.</td>
|
---|
803 | <td valign="top" align="center">No.</td>
|
---|
804 | </tr>
|
---|
805 | <tr>
|
---|
806 | <td valign="top">dependency</td>
|
---|
807 | <td valign="top">This attribute controls which additional classes and interfaces
|
---|
808 | are added to the jar. Please refer to the description
|
---|
809 | <a href="#ejbjar_deps">above</a></td>
|
---|
810 | <td valign="top" align="center">No.</td>
|
---|
811 | </tr>
|
---|
812 | </table>
|
---|
813 |
|
---|
814 | <h3>Nested Elements</h3>
|
---|
815 |
|
---|
816 | <p>In addition to the vendor specific nested elements, the ejbjar task provides
|
---|
817 | three nested elements. </p>
|
---|
818 |
|
---|
819 | <h4>Classpath</h4>
|
---|
820 |
|
---|
821 | <p>The <code><classpath></code> nested element allows the classpath
|
---|
822 | to be set. It is useful when setting the classpath from a reference path. In all
|
---|
823 | other respects the behaviour is the same as the classpath attribute.</p>
|
---|
824 |
|
---|
825 | <a name="ejbjar-dtd"><h4>dtd</h4></a>
|
---|
826 |
|
---|
827 | <p>The <code><dtd></code> element is used to specify the local location of DTDs to be
|
---|
828 | used when parsing the EJB deployment descriptor. Using a local DTD is much
|
---|
829 | faster than loading the DTD across the net. If you are running ejbjar behind a
|
---|
830 | firewall you may not even be able to access the remote DTD. The supported
|
---|
831 | vendor-specific nested elements know the location of the required DTDs within
|
---|
832 | the vendor class hierarchy and, in general, this means <code><dtd></code> elements are
|
---|
833 | not required. It does mean, however, that the vendor's class hierarchy must be
|
---|
834 | available in the classpath when Ant is started. If your want to run Ant without
|
---|
835 | requiring the vendor classes in the classpath, you would need to use a
|
---|
836 | <code><dtd></code> element.</p>
|
---|
837 |
|
---|
838 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
839 | <tr>
|
---|
840 | <td valign="top"><b>Attribute</b></td>
|
---|
841 | <td valign="top"><b>Description</b></td>
|
---|
842 | <td align="center" valign="top"><b>Required</b></td>
|
---|
843 | </tr>
|
---|
844 | <tr>
|
---|
845 | <td valign="top">publicId</td>
|
---|
846 | <td valign="top">The public Id of the DTD for which the location is being provided</td>
|
---|
847 | <td align="center" valign="top">Yes</td>
|
---|
848 | </tr>
|
---|
849 | <tr>
|
---|
850 | <td valign="top">location</td>
|
---|
851 | <td valign="top">The location of the local copy of the DTD. This can either be a
|
---|
852 | file or a resource loadable from the classpath.</td>
|
---|
853 | <td align="center" valign="top">Yes</td>
|
---|
854 | </tr>
|
---|
855 | </table>
|
---|
856 |
|
---|
857 | <h4>support</h4>
|
---|
858 |
|
---|
859 | <p>The <code><support></code> nested element is used to supply additional classes
|
---|
860 | (files) to be included in the generated jars. The <code><support></code> element is a
|
---|
861 | <a href="../CoreTypes/fileset.html">FileSet</a>, so it can either reference a fileset declared elsewhere or it can be
|
---|
862 | defined in-place with the appropriate <code><include></code> and <code><exclude></code> nested
|
---|
863 | elements. The files in the support fileset are added into the generated EJB jar
|
---|
864 | in the same relative location as their location within the support fileset. Note
|
---|
865 | that when ejbjar generates more than one jar file, the support files are added
|
---|
866 | to each one.</p>
|
---|
867 |
|
---|
868 | <h3>Vendor-specific deployment elements</h3>
|
---|
869 |
|
---|
870 | Each vendor-specific nested element controls the generation of a deployable jar
|
---|
871 | specific to that vendor's EJB container. The parameters for each supported
|
---|
872 | deployment element are detailed here.
|
---|
873 |
|
---|
874 |
|
---|
875 | <h3><a name="ejbjar_jboss">Jboss element</a></h3>
|
---|
876 |
|
---|
877 | <p>The jboss element searches for the JBoss specific deployment descriptors and adds them
|
---|
878 | to the final ejb jar file. JBoss has two deployment descriptors:
|
---|
879 | <ul><li>jboss.xml</li>
|
---|
880 | <li>for container manager persistence:<br>
|
---|
881 | <table border="1">
|
---|
882 | <tr><td><b>CMP version</b></td><td><b>File name</b></td></tr>
|
---|
883 | <tr><td>CMP 1.0</td><td>jaws.xml</td></tr>
|
---|
884 | <tr><td>CMP 2.0</td><td>jbosscmp-jdbc.xml</td></tr>
|
---|
885 | </table>
|
---|
886 | </li>
|
---|
887 | </ul>
|
---|
888 | <br>
|
---|
889 | . The JBoss server uses hot deployment and does
|
---|
890 | not require compilation of additional stubs and skeletons.</p>
|
---|
891 |
|
---|
892 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
893 | <tr>
|
---|
894 | <td valign="top"><b>Attribute</b></td>
|
---|
895 | <td valign="top"><b>Description</b></td>
|
---|
896 | <td align="center" valign="top"><b>Required</b></td>
|
---|
897 | </tr>
|
---|
898 | <tr>
|
---|
899 | <td valign="top">destdir</td>
|
---|
900 | <td valign="top">The base directory into which the generated weblogic ready
|
---|
901 | jar files are deposited. Jar files are deposited in
|
---|
902 | directories corresponding to their location within the
|
---|
903 | descriptordir namespace. </td>
|
---|
904 | <td valign="top" align="center">Yes</td>
|
---|
905 | </tr>
|
---|
906 | <tr>
|
---|
907 | <td valign="top">genericjarsuffix</td>
|
---|
908 | <td valign="top">A generic jar is generated as an intermediate step in
|
---|
909 | build the weblogic deployment jar. The suffix used to
|
---|
910 | generate the generic jar file is not particularly
|
---|
911 | important unless it is desired to keep the generic
|
---|
912 | jar file. It should not, however, be the same
|
---|
913 | as the suffix setting.</td>
|
---|
914 | <td valign="top" align="center">No, defaults to '-generic.jar'.</td>
|
---|
915 | </tr>
|
---|
916 | <tr>
|
---|
917 | <td valign="top">suffix</td>
|
---|
918 | <td valign="top">String value appended to the basename of the deployment
|
---|
919 | descriptor to create the filename of the JBoss EJB
|
---|
920 | jar file.</td>
|
---|
921 | <td valign="top" align="center">No, defaults to '.jar'.</td>
|
---|
922 | </tr>
|
---|
923 | <tr>
|
---|
924 | <td valign="top">keepgeneric</td>
|
---|
925 | <td valign="top">This controls whether the generic file used as input to
|
---|
926 | ejbc is retained.</td>
|
---|
927 | <td valign="top" align="center">No, defaults to false</td>
|
---|
928 | </tr>
|
---|
929 | </table>
|
---|
930 |
|
---|
931 |
|
---|
932 | <h3><a name="ejbjar_weblogic">Weblogic element</a></h3>
|
---|
933 |
|
---|
934 | <p>The weblogic element is used to control the weblogic.ejbc compiler for
|
---|
935 | generating weblogic EJB jars. Prior to Ant 1.3, the method of locating CMP
|
---|
936 | descriptors was to use the ejbjar naming convention. So if your ejb-jar was
|
---|
937 | called, Customer-ejb-jar.xml, your weblogic descriptor was called Customer-
|
---|
938 | weblogic-ejb-jar.xml and your CMP descriptor had to be Customer-weblogic-cmp-
|
---|
939 | rdbms-jar.xml. In addition, the <code><type-storage></code> element in the weblogic
|
---|
940 | descriptor had to be set to the standard name META-INF/weblogic-cmp-rdbms-
|
---|
941 | jar.xml, as that is where the CMP descriptor was mapped to in the generated
|
---|
942 | jar.</p>
|
---|
943 |
|
---|
944 | <p>There are a few problems with this scheme. It does not allow for more than
|
---|
945 | one CMP descriptor to be defined in a jar and it is not compatible with the
|
---|
946 | deployment descriptors generated by some tools.</p>
|
---|
947 |
|
---|
948 | <p>In Ant 1.3, ejbjar parses the weblogic deployment descriptor to discover the
|
---|
949 | CMP descriptors, which are then included automatically. This behaviour is
|
---|
950 | controlled by the newCMP attribute. Note that if you move to the new method of
|
---|
951 | determining CMP descriptors, you will need to update your weblogic deployment
|
---|
952 | descriptor's <code><type-storage></code> element. In the above example, you would
|
---|
953 | define this as META-INF/Customer-weblogic-cmp-rdbms-jar.xml.</p>
|
---|
954 |
|
---|
955 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
956 | <tr>
|
---|
957 | <td valign="top"><b>Attribute</b></td>
|
---|
958 | <td valign="top"><b>Description</b></td>
|
---|
959 | <td align="center" valign="top"><b>Required</b></td>
|
---|
960 | </tr>
|
---|
961 | <tr>
|
---|
962 | <td valign="top">destdir</td>
|
---|
963 | <td valign="top">The base directory into which the generated weblogic ready
|
---|
964 | jar files are deposited. Jar files are deposited in
|
---|
965 | directories corresponding to their location within the
|
---|
966 | descriptordir namespace. </td>
|
---|
967 | <td valign="top" align="center">Yes</td>
|
---|
968 | </tr>
|
---|
969 | <tr>
|
---|
970 | <td valign="top">genericjarsuffix</td>
|
---|
971 | <td valign="top">A generic jar is generated as an intermediate step in
|
---|
972 | build the weblogic deployment jar. The suffix used to
|
---|
973 | generate the generic jar file is not particularly
|
---|
974 | important unless it is desired to keep the generic
|
---|
975 | jar file. It should not, however, be the same
|
---|
976 | as the suffix setting.</td>
|
---|
977 | <td valign="top" align="center">No, defaults to '-generic.jar'.</td>
|
---|
978 | </tr>
|
---|
979 | <tr>
|
---|
980 | <td valign="top">suffix</td>
|
---|
981 | <td valign="top">String value appended to the basename of the deployment
|
---|
982 | descriptor to create the filename of the WebLogic EJB
|
---|
983 | jar file.</td>
|
---|
984 | <td valign="top" align="center">No, defaults to '.jar'.</td>
|
---|
985 | </tr>
|
---|
986 | <tr>
|
---|
987 | <td valign="top">classpath</td>
|
---|
988 | <td valign="top">The classpath to be used when running the weblogic ejbc
|
---|
989 | tool. Note that this tool typically requires the classes
|
---|
990 | that make up the bean to be available on the classpath.
|
---|
991 | Currently, however, this will cause the ejbc tool to be
|
---|
992 | run in a separate VM</td>
|
---|
993 | <td valign="top" align="center">No</td>
|
---|
994 | </tr>
|
---|
995 | <tr>
|
---|
996 | <td valign="top">wlclasspath</td>
|
---|
997 | <td valign="top">Weblogic 6.0 will give a warning if the home and remote interfaces
|
---|
998 | of a bean are on the system classpath used to run weblogic.ejbc.
|
---|
999 | In that case, the standard weblogic classes should be set with
|
---|
1000 | this attribute (or equivalent nested element) and the
|
---|
1001 | home and remote interfaces located with the standard classpath
|
---|
1002 | attribute</td>
|
---|
1003 | <td valign="top" align="center">No</td>
|
---|
1004 | </tr>
|
---|
1005 | <tr>
|
---|
1006 | <td valign="top">keepgeneric</td>
|
---|
1007 | <td valign="top">This controls whether the generic file used as input to
|
---|
1008 | ejbc is retained.</td>
|
---|
1009 | <td valign="top" align="center">No, defaults to false</td>
|
---|
1010 | </tr>
|
---|
1011 | <tr>
|
---|
1012 | <td valign="top">compiler</td>
|
---|
1013 | <td valign="top">This allows for the selection of a different compiler
|
---|
1014 | to be used for the compilation of the generated Java
|
---|
1015 | files. This could be set, for example, to Jikes to
|
---|
1016 | compile with the Jikes compiler. If this is not set
|
---|
1017 | and the <code>build.compiler</code> property is set
|
---|
1018 | to jikes, the Jikes compiler will be used. If this
|
---|
1019 | is not desired, the value "<code>default</code>"
|
---|
1020 | may be given to use the default compiler</td>
|
---|
1021 | <td valign="top" align="center">No</td>
|
---|
1022 | </tr>
|
---|
1023 | <tr>
|
---|
1024 | <td valign="top">rebuild</td>
|
---|
1025 | <td valign="top">This flag controls whether weblogic.ejbc is always
|
---|
1026 | invoked to build the jar file. In certain circumstances,
|
---|
1027 | such as when only a bean class has been changed, the jar
|
---|
1028 | can be generated by merely replacing the changed classes
|
---|
1029 | and not rerunning ejbc. Setting this to false will reduce
|
---|
1030 | the time to run ejbjar.
|
---|
1031 | </td>
|
---|
1032 | <td valign="top" align="center">No, defaults to true.</td>
|
---|
1033 | </tr>
|
---|
1034 | <tr>
|
---|
1035 | <td valign="top">keepgenerated</td>
|
---|
1036 | <td valign="top">Controls whether weblogic will keep the generated Java
|
---|
1037 | files used to build the class files added to the
|
---|
1038 | jar. This can be useful when debugging
|
---|
1039 | </td>
|
---|
1040 | <td valign="top" align="center">No, defaults to false.</td>
|
---|
1041 | </tr>
|
---|
1042 | <tr>
|
---|
1043 | <td valign="top">args</td>
|
---|
1044 | <td valign="top">Any additional arguments to be passed to the weblogic.ejbc
|
---|
1045 | tool.
|
---|
1046 | </td>
|
---|
1047 | <td valign="top" align="center">No.</td>
|
---|
1048 | </tr>
|
---|
1049 | <tr>
|
---|
1050 | <td valign="top">weblogicdtd</td>
|
---|
1051 | <td valign="top"><b>Deprecated</b>. Defines the location of the ejb-jar DTD in
|
---|
1052 | the weblogic class hierarchy. This should not be necessary if you
|
---|
1053 | have weblogic in your classpath. If you do not, you should use a
|
---|
1054 | nested <code><dtd></code> element, described above. If you do choose
|
---|
1055 | to use an attribute, you should use a
|
---|
1056 | nested <code><dtd></code> element.
|
---|
1057 | </td>
|
---|
1058 | <td valign="top" align="center">No.</td>
|
---|
1059 | </tr>
|
---|
1060 | <tr>
|
---|
1061 | <td valign="top">wldtd</td>
|
---|
1062 | <td valign="top"><b>Deprecated</b>. Defines the location of the weblogic-ejb-jar
|
---|
1063 | DTD which covers the Weblogic specific deployment descriptors.
|
---|
1064 | This should not be necessary if you have weblogic in your
|
---|
1065 | classpath. If you do not, you should use a nested <code><dtd></code>
|
---|
1066 | element, described above.
|
---|
1067 | </td>
|
---|
1068 | <td valign="top" align="center">No.</td>
|
---|
1069 | </tr>
|
---|
1070 | <tr>
|
---|
1071 | <td valign="top">ejbdtd</td>
|
---|
1072 | <td valign="top"><b>Deprecated</b>. Defines the location of the ejb-jar DTD in
|
---|
1073 | the weblogic class hierarchy. This should not be necessary if you
|
---|
1074 | have weblogic in your classpath. If you do not, you should use a
|
---|
1075 | nested <code><dtd></code> element, described above.
|
---|
1076 | </td>
|
---|
1077 | <td valign="top" align="center">No.</td>
|
---|
1078 | </tr>
|
---|
1079 | <tr>
|
---|
1080 | <td valign="top">newCMP</td>
|
---|
1081 | <td valign="top">If this is set to true, the new method for locating
|
---|
1082 | CMP descriptors will be used.</td>
|
---|
1083 | <td valign="top" align="center">No. Defaults to false</td>
|
---|
1084 | </tr>
|
---|
1085 | <tr>
|
---|
1086 | <td valign="top">oldCMP</td>
|
---|
1087 | <td valign="top"><b>Deprecated</b> This is an antonym for newCMP which should be used instead.</td>
|
---|
1088 | <td valign="top" align="center">No.</td>
|
---|
1089 | </tr>
|
---|
1090 | <tr>
|
---|
1091 | <td valign="top">noEJBC</td>
|
---|
1092 | <td valign="top">If this attribute is set to true, Weblogic's ejbc will not be run on the EJB jar.
|
---|
1093 | Use this if you prefer to run ejbc at deployment time.</td>
|
---|
1094 | <td valign="top" align="center">No.</td>
|
---|
1095 | </tr>
|
---|
1096 | <tr>
|
---|
1097 | <td valign="top">ejbcclass</td>
|
---|
1098 | <td valign="top">Specifies the classname of the ejbc compiler. Normally ejbjar determines
|
---|
1099 | the appropriate class based on the DTD used for the EJB. The EJB 2.0 compiler
|
---|
1100 | featured in weblogic 6 has, however, been deprecated in version 7. When
|
---|
1101 | using with version 7 this attribute should be set to
|
---|
1102 | "weblogic.ejbc" to avoid the deprecation warning.</td>
|
---|
1103 | <td valign="top" align="center">No.</td>
|
---|
1104 | </tr>
|
---|
1105 | <tr>
|
---|
1106 | <td valign="top">jvmargs</td>
|
---|
1107 | <td valign="top">Any additional arguments to be passed to the Virtual Machine
|
---|
1108 | running weblogic.ejbc tool. For example to set the memory size,
|
---|
1109 | this could be jvmargs="-Xmx128m"
|
---|
1110 | </td>
|
---|
1111 | <td valign="top" align="center">No.</td>
|
---|
1112 | </tr>
|
---|
1113 | <tr>
|
---|
1114 | <td valign="top">jvmdebuglevel</td>
|
---|
1115 | <td valign="top">Sets the weblogic.StdoutSeverityLevel to use when running
|
---|
1116 | the Virtual Machine that executes ejbc. Set to 16 to avoid
|
---|
1117 | the warnings about EJB Home and Remotes being in the classpath
|
---|
1118 | </td>
|
---|
1119 | <td valign="top" align="center">No.</td>
|
---|
1120 | </tr>
|
---|
1121 | <tr>
|
---|
1122 | <td valign="top">outputdir</td>
|
---|
1123 | <td valign="top">If set ejbc will be given this directory as the output
|
---|
1124 | destination rather than a jar file. This allows for the
|
---|
1125 | generation of "exploded" jars.
|
---|
1126 | </td>
|
---|
1127 | <td valign="top" align="center">No.</td>
|
---|
1128 | </tr>
|
---|
1129 | </table>
|
---|
1130 |
|
---|
1131 | <p>The weblogic nested element supports three nested elements. The
|
---|
1132 | first two, <code><classpath></code> and <code><wlclasspath></code>, are used to set the
|
---|
1133 | respective classpaths. These nested elements are useful when setting up
|
---|
1134 | class paths using reference Ids. The last, <code><sysproperty></code>, allows
|
---|
1135 | Java system properties to be set during the compiler run. This turns out
|
---|
1136 | to be necessary for supporting CMP EJB compilation in all environments.
|
---|
1137 | </p>
|
---|
1138 |
|
---|
1139 | <h3>TOPLink for Weblogic element</h3>
|
---|
1140 |
|
---|
1141 | <p><b><i>Deprecated</i></b></p>
|
---|
1142 |
|
---|
1143 | <p>The toplink element is no longer required. Toplink beans can now be built with the standard
|
---|
1144 | weblogic element, as long as the newCMP attribute is set to "true"
|
---|
1145 | </p>
|
---|
1146 |
|
---|
1147 | <p>The TopLink element is used to handle beans which use Toplink for the CMP operations. It
|
---|
1148 | is derived from the standard weblogic element so it supports the same set of attributes plus these
|
---|
1149 | additional attributes</p>
|
---|
1150 |
|
---|
1151 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
1152 | <tr>
|
---|
1153 | <td valign="top"><b>Attribute</b></td>
|
---|
1154 | <td valign="top"><b>Description</b></td>
|
---|
1155 | <td align="center" valign="top"><b>Required</b></td>
|
---|
1156 | </tr>
|
---|
1157 | <tr>
|
---|
1158 | <td valign="top">toplinkdescriptor</td>
|
---|
1159 | <td valign="top">This specifies the name of the TOPLink deployment descriptor file contained in the
|
---|
1160 | 'descriptordir' directory.</td>
|
---|
1161 | <td valign="top" align="center">Yes</td>
|
---|
1162 | </tr>
|
---|
1163 | <tr>
|
---|
1164 | <td valign="top">toplinkdtd</td>
|
---|
1165 | <td valign="top">This specifies the location of the TOPLink DTD file. This can be a file path or
|
---|
1166 | a file URL. This attribute is not required, but using a local DTD is recommended.</td>
|
---|
1167 | <td valign="top" align="center">No, defaults to dtd file at www.objectpeople.com.</td>
|
---|
1168 | </tr>
|
---|
1169 | </table>
|
---|
1170 |
|
---|
1171 |
|
---|
1172 | <h3>Examples</h3>
|
---|
1173 |
|
---|
1174 | <p>This example shows ejbjar being used to generate deployment jars using a
|
---|
1175 | Weblogic EJB container. This example requires the naming standard to be used for
|
---|
1176 | the deployment descriptors. Using this format will create a ejb jar file for
|
---|
1177 | each variation of '*-ejb-jar.xml' that is found in the deployment descriptor
|
---|
1178 | directory.</p>
|
---|
1179 |
|
---|
1180 | <pre>
|
---|
1181 | <ejbjar srcdir="${build.classes}"
|
---|
1182 | descriptordir="${descriptor.dir}">
|
---|
1183 | <weblogic destdir="${deploymentjars.dir}"
|
---|
1184 | classpath="${descriptorbuild.classpath}"/>
|
---|
1185 | <include name="**/*-ejb-jar.xml"/>
|
---|
1186 | <exclude name="**/*weblogic*.xml"/>
|
---|
1187 | </ejbjar>
|
---|
1188 | </pre>
|
---|
1189 |
|
---|
1190 | <p>If weblogic is not in the Ant classpath, the following example
|
---|
1191 | shows how to specify the location of the weblogic DTDs. This
|
---|
1192 | example also show the use of a nested classpath element.</p>
|
---|
1193 |
|
---|
1194 | <pre>
|
---|
1195 | <ejbjar descriptordir="${src.dir}" srcdir="${build.classes}">
|
---|
1196 | <weblogic destdir="${deployment.webshop.dir}"
|
---|
1197 | keepgeneric="true"
|
---|
1198 | args="-g -keepgenerated ${ejbc.compiler}"
|
---|
1199 | suffix=".jar"
|
---|
1200 | oldCMP="false">
|
---|
1201 | <classpath>
|
---|
1202 | <pathelement path="${descriptorbuild.classpath}"/>
|
---|
1203 | </classpath>
|
---|
1204 | </weblogic>
|
---|
1205 | <include name="**/*-ejb-jar.xml"/>
|
---|
1206 | <exclude name="**/*-weblogic-ejb-jar.xml"/>
|
---|
1207 | <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
|
---|
1208 | location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/ejb-jar.dtd"/>
|
---|
1209 | <dtd publicId="-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN"
|
---|
1210 | location="${weblogic.home}/classes/weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd"/>
|
---|
1211 | </ejbjar>
|
---|
1212 | </pre>
|
---|
1213 |
|
---|
1214 |
|
---|
1215 | <p>This example shows ejbjar being used to generate a single deployment jar
|
---|
1216 | using a Weblogic EJB container. This example does not require the deployment
|
---|
1217 | descriptors to use the naming standard. This will create only one ejb jar file -
|
---|
1218 | 'TheEJBJar.jar'.</p>
|
---|
1219 |
|
---|
1220 |
|
---|
1221 | <pre>
|
---|
1222 | <ejbjar srcdir="${build.classes}"
|
---|
1223 | descriptordir="${descriptor.dir}"
|
---|
1224 | basejarname="TheEJBJar">
|
---|
1225 | <weblogic destdir="${deploymentjars.dir}"
|
---|
1226 | classpath="${descriptorbuild.classpath}"/>
|
---|
1227 | <include name="**/ejb-jar.xml"/>
|
---|
1228 | <exclude name="**/weblogic*.xml"/>
|
---|
1229 | </ejbjar>
|
---|
1230 | </pre>
|
---|
1231 |
|
---|
1232 | <p>This example shows ejbjar being used to generate deployment jars for a TOPLink-enabled entity bean using a
|
---|
1233 | Weblogic EJB container. This example does not require the deployment descriptors to use the naming standard.
|
---|
1234 | This will create only one TOPLink-enabled ejb jar file - 'Address.jar'.</p>
|
---|
1235 |
|
---|
1236 | <pre>
|
---|
1237 | <ejbjar srcdir="${build.dir}"
|
---|
1238 | destdir="${solant.ejb.dir}"
|
---|
1239 | descriptordir="${descriptor.dir}"
|
---|
1240 | basejarname="Address">
|
---|
1241 | <weblogictoplink destdir="${solant.ejb.dir}"
|
---|
1242 | classpath="${java.class.path}"
|
---|
1243 | keepgeneric="false"
|
---|
1244 | toplinkdescriptor="Address.xml"
|
---|
1245 | toplinkdtd="file:///dtdfiles/toplink-cmp_2_5_1.dtd"
|
---|
1246 | suffix=".jar"/>
|
---|
1247 | <include name="**/ejb-jar.xml"/>
|
---|
1248 | <exclude name="**/weblogic-ejb-jar.xml"/>
|
---|
1249 | </ejbjar>
|
---|
1250 | </pre>
|
---|
1251 |
|
---|
1252 | <p>This final example shows how you would set-up ejbjar under Weblogic 6.0. It also shows the use of the
|
---|
1253 | <code><support></code> element to add support files</p>
|
---|
1254 |
|
---|
1255 | <pre>
|
---|
1256 | <ejbjar descriptordir="${dd.dir}" srcdir="${build.classes.server}">
|
---|
1257 | <include name="**/*-ejb-jar.xml"/>
|
---|
1258 | <exclude name="**/*-weblogic-ejb-jar.xml"/>
|
---|
1259 | <support dir="${build.classes.server}">
|
---|
1260 | <include name="**/*.class"/>
|
---|
1261 | </support>
|
---|
1262 | <weblogic destdir="${deployment.dir}"
|
---|
1263 | keepgeneric="true"
|
---|
1264 | suffix=".jar"
|
---|
1265 | rebuild="false">
|
---|
1266 | <classpath>
|
---|
1267 | <pathelement path="${build.classes.server}"/>
|
---|
1268 | </classpath>
|
---|
1269 | <wlclasspath>
|
---|
1270 | <pathelement path="${weblogic.classes}"/>
|
---|
1271 | </wlclasspath>
|
---|
1272 | </weblogic>
|
---|
1273 | </ejbjar>
|
---|
1274 | </pre>
|
---|
1275 |
|
---|
1276 |
|
---|
1277 | <h3><a name="ejbjar_websphere">WebSphere element</a></h3>
|
---|
1278 |
|
---|
1279 | <p>The websphere element searches for the websphere specific deployment descriptors and
|
---|
1280 | adds them to the final ejb jar file. Websphere has two specific descriptors for session
|
---|
1281 | beans:
|
---|
1282 | <ul>
|
---|
1283 | <li>ibm-ejb-jar-bnd.xmi</li>
|
---|
1284 | <li>ibm-ejb-jar-ext.xmi</li>
|
---|
1285 | </ul>
|
---|
1286 | and another two for container managed entity beans:
|
---|
1287 | <ul>
|
---|
1288 | <li>Map.mapxmi</li>
|
---|
1289 | <li>Schema.dbxmi</li>
|
---|
1290 | </ul>
|
---|
1291 | In terms of WebSphere, the generation of container code and stubs is called <code>deployment</code>.
|
---|
1292 | This step can be performed by the websphere element as part of the jar generation process. If the
|
---|
1293 | switch <code>ejbdeploy</code> is on, the ejbdeploy tool from the websphere toolset is called for
|
---|
1294 | every ejb-jar. Unfortunately, this step only works, if you use the ibm jdk. Otherwise, the rmic
|
---|
1295 | (called by ejbdeploy) throws a ClassFormatError. Be sure to switch ejbdeploy off, if run ant with
|
---|
1296 | sun jdk.
|
---|
1297 | </p>
|
---|
1298 |
|
---|
1299 | <p>
|
---|
1300 | For the websphere element to work, you have to provide a complete classpath, that contains all
|
---|
1301 | classes, that are required to reflect the bean classes. For ejbdeploy to work, you must also provide
|
---|
1302 | the classpath of the ejbdeploy tool and set the <i>websphere.home</i> property (look at the examples below).
|
---|
1303 | </p>
|
---|
1304 |
|
---|
1305 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
1306 | <tr>
|
---|
1307 | <td valign="top"><b>Attribute</b></td>
|
---|
1308 | <td valign="top"><b>Description</b></td>
|
---|
1309 | <td align="center" valign="top"><b>Required</b></td>
|
---|
1310 | </tr>
|
---|
1311 | <tr>
|
---|
1312 | <td valign="top">destdir</td>
|
---|
1313 | <td valign="top">The base directory into which the generated weblogic ready
|
---|
1314 | jar files are deposited. Jar files are deposited in
|
---|
1315 | directories corresponding to their location within the
|
---|
1316 | descriptordir namespace. </td>
|
---|
1317 | <td valign="top" align="center">Yes</td>
|
---|
1318 | </tr>
|
---|
1319 | <tr>
|
---|
1320 | <td valign="top">ejbdeploy</td>
|
---|
1321 | <td valign="top">Decides whether ejbdeploy is called. When you set this to true,
|
---|
1322 | be sure, to run ant with the ibm jdk.</td>
|
---|
1323 | <td valign="top" align="center">No, defaults to true</td>
|
---|
1324 | </tr>
|
---|
1325 | <tr>
|
---|
1326 | <td valign="top">suffix</td>
|
---|
1327 | <td valign="top">String value appended to the basename of the deployment
|
---|
1328 | descriptor to create the filename of the WebLogic EJB
|
---|
1329 | jar file.</td>
|
---|
1330 | <td valign="top" align="center">No, defaults to '.jar'.</td>
|
---|
1331 | </tr>
|
---|
1332 | <tr>
|
---|
1333 | <td valign="top">keepgeneric</td>
|
---|
1334 | <td valign="top">This controls whether the generic file used as input to
|
---|
1335 | ejbdeploy is retained.</td>
|
---|
1336 | <td valign="top" align="center">No, defaults to false</td>
|
---|
1337 | </tr>
|
---|
1338 | <tr>
|
---|
1339 | <td valign="top">rebuild</td>
|
---|
1340 | <td valign="top">This controls whether ejbdeploy is called although no changes
|
---|
1341 | have occurred.</td>
|
---|
1342 | <td valign="top" align="center">No, defaults to false</td>
|
---|
1343 | </tr>
|
---|
1344 | <tr>
|
---|
1345 | <td valign="top">tempdir</td>
|
---|
1346 | <td valign="top">A directory, where ejbdeploy will write temporary files</td>
|
---|
1347 | <td valign="top" align="center">No, defaults to '_ejbdeploy_temp'.</td>
|
---|
1348 | </tr>
|
---|
1349 | <tr>
|
---|
1350 | <td valign="top">dbName<br>dbSchema</td>
|
---|
1351 | <td valign="top">These options are passed to ejbdeploy.</td>
|
---|
1352 | <td valign="top" align="center">No</td>
|
---|
1353 | </tr>
|
---|
1354 | <tr>
|
---|
1355 | <td valign="top">dbVendor</td>
|
---|
1356 | <td valign="top">This option is passed to ejbdeploy.
|
---|
1357 | <p>
|
---|
1358 | Valid options can be obtained by running the following command:
|
---|
1359 | <code>
|
---|
1360 | <WAS_HOME>/bin/EJBDeploy.[sh/bat] -help
|
---|
1361 | </code>
|
---|
1362 | </p>
|
---|
1363 | This is also used to determine the name of the Map.mapxmi and
|
---|
1364 | Schema.dbxmi files, for example Account-DB2UDBWIN_V71-Map.mapxmi
|
---|
1365 | and Account-DB2UDBWIN_V71-Schema.dbxmi.
|
---|
1366 | </td>
|
---|
1367 | <td valign="top" align="center">No</td>
|
---|
1368 | </tr>
|
---|
1369 | <tr>
|
---|
1370 | <td valign="top">codegen<br>quiet<br>novalidate<br>noinform<br>trace<br>
|
---|
1371 | use35MappingRules</td>
|
---|
1372 | <td valign="top">These options are all passed to ejbdeploy. All options
|
---|
1373 | except 'quiet' default to false.</td>
|
---|
1374 | <td valign="top" align="center">No</td>
|
---|
1375 | </tr>
|
---|
1376 | <tr>
|
---|
1377 | <td valign="top">rmicOptions</td>
|
---|
1378 | <td valign="top">This option is passed to ejbdeploy and will be passed
|
---|
1379 | on to rmic.</td>
|
---|
1380 | <td valign="top" align="center">No</td>
|
---|
1381 | </tr>
|
---|
1382 | </table>
|
---|
1383 |
|
---|
1384 | <p>This example shows ejbjar being used to generate deployment jars for all deployment descriptors
|
---|
1385 | in the descriptor dir:</p>
|
---|
1386 |
|
---|
1387 | <pre>
|
---|
1388 | <property name="webpshere.home" value="${was4.home}"/>
|
---|
1389 | <ejbjar srcdir="${build.class}" descriptordir="etc/ejb">
|
---|
1390 | <include name="*-ejb-jar.xml"/>
|
---|
1391 | <websphere dbvendor="DB2UDBOS390_V6"
|
---|
1392 | ejbdeploy="true"
|
---|
1393 | oldCMP="false"
|
---|
1394 | tempdir="/tmp"
|
---|
1395 | destdir="${dist.server}">
|
---|
1396 | <wasclasspath>
|
---|
1397 | <pathelement location="${was4.home}/deploytool/itp/plugins/org.eclipse.core.boot/boot.jar"/>
|
---|
1398 | <pathelement location="${was4.home}/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime/batch.jar"/>
|
---|
1399 | <pathelement location="${was4.home}/lib/xerces.jar"/>
|
---|
1400 | <pathelement location="${was4.home}/lib/ivjejb35.jar"/>
|
---|
1401 | <pathelement location="${was4.home}/lib/j2ee.jar"/>
|
---|
1402 | <pathelement location="${was4.home}/lib/vaprt.jar"/>
|
---|
1403 | </wasclasspath>
|
---|
1404 | <classpath>
|
---|
1405 | <path refid="build.classpath"/>
|
---|
1406 | </classpath>
|
---|
1407 | </websphere>
|
---|
1408 | <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
|
---|
1409 | location="${lib}/dtd/ejb-jar_1_1.dtd"/>
|
---|
1410 | </ejbjar>
|
---|
1411 | </pre>
|
---|
1412 |
|
---|
1413 | <h3><a name="ejbjar_iplanet">iPlanet Application Server (iAS) element</a></h3>
|
---|
1414 |
|
---|
1415 | The <iplanet< nested element is used to build iAS-specific stubs and
|
---|
1416 |
|
---|
1417 | skeletons and construct a JAR file which may be deployed to the iPlanet
|
---|
1418 | Application Server 6.0. The build process will always determine if
|
---|
1419 | the EJB stubs/skeletons and the EJB-JAR file are up to date, and it will
|
---|
1420 | do the minimum amount of work required.
|
---|
1421 | <p>Like the WebLogic element, a naming convention for the EJB descriptors
|
---|
1422 | is most commonly used to specify the name for the completed JAR file.
|
---|
1423 | For example, if the EJB descriptor ejb/Account-ejb-jar.xml is found in
|
---|
1424 | the descriptor directory, the iplanet element will search for an iAS-specific
|
---|
1425 | EJB descriptor file named ejb/Account-ias-ejb-jar.xml (if it isn't found,
|
---|
1426 | the task will fail) and a JAR file named ejb/Account.jar will be written
|
---|
1427 | in the destination directory. Note that when the EJB descriptors
|
---|
1428 | are added to the JAR file, they are automatically renamed META-INF/ejb-jar.xml
|
---|
1429 | and META-INF/ias-ejb-jar.xml.</p>
|
---|
1430 | <p>Of course, this naming behaviour can be modified by specifying attributes
|
---|
1431 | in the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
|
---|
1432 | as well as the iplanet element (for example, suffix). Refer to the
|
---|
1433 | appropriate documentation for more details.</p>
|
---|
1434 | <h3>
|
---|
1435 | Parameters:</h3>
|
---|
1436 |
|
---|
1437 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
1438 | <tr>
|
---|
1439 | <td valign="top"><b>Attribute</b></td>
|
---|
1440 |
|
---|
1441 | <td valign="top"><b>Description</b></td>
|
---|
1442 |
|
---|
1443 | <td align="center" valign="top"><b>Required</b></td>
|
---|
1444 | </tr>
|
---|
1445 |
|
---|
1446 | <tr>
|
---|
1447 | <td valign="top">destdir</td>
|
---|
1448 |
|
---|
1449 | <td valign="top">The base directory into which the generated JAR files will
|
---|
1450 | be written. Each JAR file is written in directories which correspond to
|
---|
1451 | their location within the "descriptordir" namespace.</td>
|
---|
1452 |
|
---|
1453 | <td align="center" valign="top">Yes</td>
|
---|
1454 | </tr>
|
---|
1455 |
|
---|
1456 | <tr>
|
---|
1457 | <td valign="top">classpath</td>
|
---|
1458 |
|
---|
1459 | <td valign="top">The classpath used when generating EJB stubs and skeletons.
|
---|
1460 | If omitted, the classpath specified in the "ejbjar" parent task will be
|
---|
1461 | used. If specified, the classpath elements will be prepended to the
|
---|
1462 | classpath specified in the parent "ejbjar" task. Note that nested "classpath"
|
---|
1463 | elements may also be used.</td>
|
---|
1464 |
|
---|
1465 | <td align="center" valign="top">No</td>
|
---|
1466 | </tr>
|
---|
1467 |
|
---|
1468 | <tr>
|
---|
1469 | <td valign="top">keepgenerated</td>
|
---|
1470 |
|
---|
1471 | <td valign="top">Indicates whether or not the Java source files which are
|
---|
1472 | generated by ejbc will be saved or automatically deleted. If "yes", the
|
---|
1473 | source files will be retained. If omitted, it defaults to "no". </td>
|
---|
1474 |
|
---|
1475 | <td align="center" valign="top">No</td>
|
---|
1476 | </tr>
|
---|
1477 |
|
---|
1478 | <tr>
|
---|
1479 | <td valign="top">debug</td>
|
---|
1480 |
|
---|
1481 | <td>Indicates whether or not the ejbc utility should log additional debugging
|
---|
1482 | statements to the standard output. If "yes", the additional debugging statements
|
---|
1483 | will be generated. If omitted, it defaults to "no". </td>
|
---|
1484 |
|
---|
1485 | <td align="center" valign="top">No</td>
|
---|
1486 | </tr>
|
---|
1487 |
|
---|
1488 | <tr>
|
---|
1489 | <td valign="top">iashome</td>
|
---|
1490 |
|
---|
1491 | <td>May be used to specify the "home" directory for this iAS installation.
|
---|
1492 | This is used to find the ejbc utility if it isn't included in the user's
|
---|
1493 | system path. If specified, it should refer to the [install-location]/iplanet/ias6/ias
|
---|
1494 | directory. If omitted, the ejbc utility must be on the user's system
|
---|
1495 | path. </td>
|
---|
1496 |
|
---|
1497 | <td align="center" valign="top">No</td>
|
---|
1498 | </tr>
|
---|
1499 |
|
---|
1500 | <tr>
|
---|
1501 | <td valign="top">suffix</td>
|
---|
1502 |
|
---|
1503 | <td>String value appended to the JAR filename when creating each JAR.
|
---|
1504 | If omitted, it defaults to ".jar". </td>
|
---|
1505 |
|
---|
1506 | <td align="center" valign="top">No</td>
|
---|
1507 | </tr>
|
---|
1508 | </table>
|
---|
1509 |
|
---|
1510 | <p>As noted above, the iplanet element supports additional <code><classpath></code>
|
---|
1511 | nested elements.</p>
|
---|
1512 | <h3>
|
---|
1513 | Examples</h3>
|
---|
1514 | This example demonstrates the typical use of the <code><iplanet></code> nested element.
|
---|
1515 | It will name each EJB-JAR using the "basename" prepended to each standard
|
---|
1516 | EJB descriptor. For example, if the descriptor named "Account-ejb-jar.xml"
|
---|
1517 | is processed, the EJB-JAR will be named "Account.jar"
|
---|
1518 | <pre>
|
---|
1519 | <ejbjar srcdir="${build.classesdir}"
|
---|
1520 | descriptordir="${src}">
|
---|
1521 |
|
---|
1522 | <iplanet destdir="${assemble.ejbjar}"
|
---|
1523 | classpath="${ias.ejbc.cpath}"/>
|
---|
1524 | <include name="**/*-ejb-jar.xml"/>
|
---|
1525 | <exclude name="**/*ias-*.xml"/>
|
---|
1526 | </ejbjar></pre>
|
---|
1527 |
|
---|
1528 | This example demonstrates the use of a nested classpath element as well
|
---|
1529 | as some of the other optional attributes.
|
---|
1530 | <pre>
|
---|
1531 | <ejbjar srcdir="${build.classesdir}"
|
---|
1532 | descriptordir="${src}">
|
---|
1533 |
|
---|
1534 | <iplanet destdir="${assemble.ejbjar}"
|
---|
1535 | iashome="${ias.home}"
|
---|
1536 | debug="yes"
|
---|
1537 | keepgenerated="yes">
|
---|
1538 | <classpath>
|
---|
1539 | <pathelement path="."/>
|
---|
1540 | <pathelement path="${build.classpath}"/>
|
---|
1541 | </classpath>
|
---|
1542 | </iplanet>
|
---|
1543 | <include name="**/*-ejb-jar.xml"/>
|
---|
1544 | <exclude name="**/*ias-*.xml"/>
|
---|
1545 | </ejbjar></pre>
|
---|
1546 |
|
---|
1547 | This example demonstrates the use of basejarname attribute. In this
|
---|
1548 | case, the completed EJB-JAR will be named "HelloWorld.jar" If multiple
|
---|
1549 | EJB descriptors might be found, care must be taken to ensure that the completed
|
---|
1550 | JAR files don't overwrite each other.
|
---|
1551 | <pre>
|
---|
1552 | <ejbjar srcdir="${build.classesdir}"
|
---|
1553 | descriptordir="${src}"
|
---|
1554 | basejarname="HelloWorld">
|
---|
1555 |
|
---|
1556 | <iplanet destdir="${assemble.ejbjar}"
|
---|
1557 | classpath="${ias.ejbc.cpath}"/>
|
---|
1558 | <include name="**/*-ejb-jar.xml"/>
|
---|
1559 | <exclude name="**/*ias-*.xml"/>
|
---|
1560 | </ejbjar></pre>
|
---|
1561 | This example demonstrates the use of the dtd nested element. If the local
|
---|
1562 | copies of the DTDs are included in the classpath, they will be automatically
|
---|
1563 | referenced without the nested elements. In iAS 6.0 SP2, these local DTDs are
|
---|
1564 | found in the [iAS-install-directory]/APPS directory. In iAS 6.0 SP3, these
|
---|
1565 | local DTDs are found in the [iAS-install-directory]/dtd directory.
|
---|
1566 | <pre>
|
---|
1567 | <ejbjar srcdir="${build.classesdir}"
|
---|
1568 | descriptordir="${src}">
|
---|
1569 | <iplanet destdir="${assemble.ejbjar}">
|
---|
1570 | classpath="${ias.ejbc.cpath}"/>
|
---|
1571 | <include name="**/*-ejb-jar.xml"/>
|
---|
1572 | <exclude name="**/*ias-*.xml"/>
|
---|
1573 |
|
---|
1574 | <dtd publicId="-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
|
---|
1575 | location="${ias.home}/APPS/ejb-jar_1_1.dtd"/>
|
---|
1576 | <dtd publicId="-//Sun Microsystems, Inc.//DTD iAS Enterprise JavaBeans 1.0//EN"
|
---|
1577 | location="${ias.home}/APPS/IASEjb_jar_1_0.dtd"/>
|
---|
1578 | </ejbjar></pre>
|
---|
1579 |
|
---|
1580 | <h3><a name="ejbjar_jonas">JOnAS (Java Open Application Server) element</a></h3>
|
---|
1581 |
|
---|
1582 | <p>The <code><jonas></code> nested element is used to build JOnAS-specific stubs and
|
---|
1583 | skeletons thanks to the <code>GenIC</code> specific tool, and construct a JAR
|
---|
1584 | file which may be deployed to the JOnAS Application Server. The build process
|
---|
1585 | will always determine if the EJB stubs/skeletons and the EJB-JAR file are up to
|
---|
1586 | date, and it will do the minimum amount of work required.</p>
|
---|
1587 |
|
---|
1588 | <p>Like the WebLogic element, a naming convention for the EJB descriptors is
|
---|
1589 | most commonly used to specify the name for the completed JAR file. For example,
|
---|
1590 | if the EJB descriptor <code>ejb/Account-ejb-jar.xml</code> is found in the
|
---|
1591 | descriptor directory, the <code><jonas></code> element will search for a JOnAS-specific
|
---|
1592 | EJB descriptor file named <code>ejb/Account-jonas-ejb-jar.xml</code> and a JAR
|
---|
1593 | file named <code>ejb/Account.jar</code> will be written in the destination
|
---|
1594 | directory. But the <code><jonas></code> element can also use the JOnAS naming
|
---|
1595 | convention. With the same example as below, the EJB descriptor can also be named
|
---|
1596 | <code>ejb/Account.xml</code> (no base name terminator here) in the descriptor
|
---|
1597 | directory. Then the <code><jonas></code> element will search for a JOnAS-specific EJB
|
---|
1598 | descriptor file called <code>ejb/jonas-Account.xml</code>. This convention do
|
---|
1599 | not follow strictly the ejb-jar naming convention recommendation but is
|
---|
1600 | supported for backward compatibility with previous version of JOnAS.</p>
|
---|
1601 |
|
---|
1602 | <p>Note that when the EJB descriptors are added to the JAR file, they are
|
---|
1603 | automatically renamed <code>META-INF/ejb-jar.xml</code> and
|
---|
1604 | <code>META-INF/jonas-ejb-jar.xml</code>.</p>
|
---|
1605 |
|
---|
1606 | <p>Of course, this naming behavior can be modified by specifying attributes in
|
---|
1607 | the ejbjar task (for example, basejarname, basenameterminator, and flatdestdir)
|
---|
1608 | as well as the iplanet element (for example, suffix). Refer to the appropriate
|
---|
1609 | documentation for more details.</p>
|
---|
1610 |
|
---|
1611 | <h3> Parameters:</h3>
|
---|
1612 |
|
---|
1613 | <table border="1" cellspacing="0" cellpadding="2">
|
---|
1614 | <tbody>
|
---|
1615 | <tr>
|
---|
1616 | <td valign="Top"><b>Attribute</b></td>
|
---|
1617 | <td valign="Top"><b>Description</b></td>
|
---|
1618 | <td align="Center" valign="Top"><b>Required</b></td>
|
---|
1619 | </tr>
|
---|
1620 | <tr>
|
---|
1621 | <td valign="Top">destdir</td>
|
---|
1622 | <td valign="Top">The base directory into which the generated JAR files
|
---|
1623 | will be written. Each JAR file is written in directories which correspond
|
---|
1624 | to their location within the "<code>descriptordir</code>" namespace.</td>
|
---|
1625 | <td align="Center" valign="Top">Yes</td>
|
---|
1626 | </tr>
|
---|
1627 | <tr>
|
---|
1628 | <td valign="Top">jonasroot</td>
|
---|
1629 | <td valign="Top">The root directory for JOnAS.</td>
|
---|
1630 | <td valign="Top" align="Center">Yes</td>
|
---|
1631 | </tr>
|
---|
1632 | <tr>
|
---|
1633 | <td valign="Top">classpath</td>
|
---|
1634 | <td valign="Top">The classpath used when generating EJB stubs and
|
---|
1635 | skeletons. If omitted, the classpath specified in the "ejbjar" parent
|
---|
1636 | task will be used. If specified, the classpath elements will be prepended
|
---|
1637 | to the classpath specified in the parent "ejbjar" task (see also the ORB
|
---|
1638 | attribute documentation below). Note that nested "classpath" elements may
|
---|
1639 | also be used.</td>
|
---|
1640 | <td valign="Top" align="Center">No</td>
|
---|
1641 | </tr>
|
---|
1642 | <tr>
|
---|
1643 | <td valign="Top">keepgenerated</td>
|
---|
1644 | <td valign="Top"><code>true</code> if the intermediate Java
|
---|
1645 | source files generated by GenIC must be deleted or not. If
|
---|
1646 | omitted, it defaults to <code>false</code>.</td>
|
---|
1647 | <td align="Center" valign="Top">No</td>
|
---|
1648 | </tr>
|
---|
1649 | <tr>
|
---|
1650 | <td valign="Top">nocompil</td>
|
---|
1651 | <td valign="Top"><code>true</code> if the generated source files
|
---|
1652 | must not be compiled via the java and rmi compilers. If omitted,
|
---|
1653 | it defaults to <code>false</code>.</td>
|
---|
1654 | <td align="Center" valign="Top">No</td>
|
---|
1655 | </tr>
|
---|
1656 | <tr>
|
---|
1657 | <td valign="Top">novalidation</td>
|
---|
1658 | <td valign="Top"><code>true</code> if the XML deployment descriptors must
|
---|
1659 | be parsed without validation. If omitted, it defaults to <code>false</code>.</td>
|
---|
1660 | <td align="Center" valign="Top">No</td>
|
---|
1661 | </tr>
|
---|
1662 | <tr>
|
---|
1663 | <td valign="Top">javac</td>
|
---|
1664 | <td valign="Top">Java compiler to use. If omitted, it defaults
|
---|
1665 | to the value of <code>build.compiler</code> property.</td>
|
---|
1666 | <td align="Center" valign="Top">No</td>
|
---|
1667 | </tr>
|
---|
1668 | <tr>
|
---|
1669 | <td valign="Top">javacopts</td>
|
---|
1670 | <td valign="Top">Options to pass to the java compiler.</td>
|
---|
1671 | <td align="Center" valign="Top">No</td>
|
---|
1672 | </tr>
|
---|
1673 | <tr>
|
---|
1674 | <td valign="Top">rmicopts</td>
|
---|
1675 | <td valign="Top">Options to pass to the rmi compiler.</td>
|
---|
1676 | <td align="Center" valign="Top">No</td>
|
---|
1677 | </tr>
|
---|
1678 | <tr>
|
---|
1679 | <td valign="top">secpropag</td>
|
---|
1680 | <td valign="top"><code>true</code> if the RMI Skel. and
|
---|
1681 | Stub. must be modified to implement the implicit propagation of
|
---|
1682 | the security context (the transactional context is always
|
---|
1683 | provided). If omitted, it defaults to <code>false</code>.</td>
|
---|
1684 | <td valign="top" align="center">No</td>
|
---|
1685 | </tr>
|
---|
1686 | <tr>
|
---|
1687 | <td valign="Top">verbose</td>
|
---|
1688 | <td valign="Top">Indicates whether or not to use -verbose switch. If
|
---|
1689 | omitted, it defaults to <code>false</code>.</td>
|
---|
1690 | <td align="Center" valign="Top">No</td>
|
---|
1691 | </tr>
|
---|
1692 | <tr>
|
---|
1693 | <td valign="Top">additionalargs</td>
|
---|
1694 | <td valign="Top">Add additional args to GenIC.</td>
|
---|
1695 | <td align="Center" valign="Top">No</td>
|
---|
1696 | </tr>
|
---|
1697 | <tr>
|
---|
1698 | <td valign="Top">keepgeneric</td>
|
---|
1699 | <td valign="Top"><code>true</code> if the generic JAR file used as input
|
---|
1700 | to GenIC must be retained. If omitted, it defaults to <code>false</code>.</td>
|
---|
1701 | <td align="Center" valign="Top">No</td>
|
---|
1702 | </tr>
|
---|
1703 | <tr>
|
---|
1704 | <td valign="Top">suffix</td>
|
---|
1705 | <td>String value appended to the JAR filename when creating each JAR. If
|
---|
1706 | omitted, it defaults to ".jar". </td>
|
---|
1707 | <td align="Center" valign="Top">No</td>
|
---|
1708 | </tr>
|
---|
1709 | <tr>
|
---|
1710 | <td valign="Top">orb</td>
|
---|
1711 | <td>Choose your ORB : RMI, JEREMIE, DAVID. If omitted, it defaults to the
|
---|
1712 | one present in classpath. If specified, the corresponding JOnAS JAR is
|
---|
1713 | automatically added to the classpath.</td>
|
---|
1714 | <td align="Center" valign="Top">No</td>
|
---|
1715 | </tr>
|
---|
1716 | <tr>
|
---|
1717 | <td valign="Top">nogenic</td>
|
---|
1718 | <td valign="Top">If this attribute is set to <code>true</code>,
|
---|
1719 | JOnAS's GenIC will not be run on the EJB JAR. Use this if you
|
---|
1720 | prefer to run GenIC at deployment time. If omitted, it defaults
|
---|
1721 | to <code>false</code>.</td>
|
---|
1722 | <td align="Center" valign="Top">No</td>
|
---|
1723 | </tr>
|
---|
1724 | <tr>
|
---|
1725 | </tbody>
|
---|
1726 | </table>
|
---|
1727 |
|
---|
1728 | <p>As noted above, the jonas element supports additional <code><classpath></code>
|
---|
1729 | nested elements.</p>
|
---|
1730 |
|
---|
1731 | <h3>Examples</h3>
|
---|
1732 |
|
---|
1733 | <p>This example shows ejbjar being used to generate deployment jars using a
|
---|
1734 | JOnAS EJB container. This example requires the naming standard to be used for
|
---|
1735 | the deployment descriptors. Using this format will create a EJB JAR file for
|
---|
1736 | each variation of '*-jar.xml' that is found in the deployment descriptor
|
---|
1737 | directory. </p>
|
---|
1738 |
|
---|
1739 | <pre>
|
---|
1740 | <ejbjar srcdir="${build.classes}"
|
---|
1741 | descriptordir="${descriptor.dir}">
|
---|
1742 | <jonas destdir="${deploymentjars.dir}"
|
---|
1743 | jonasroot="${jonas.root}"
|
---|
1744 | orb="RMI"/>
|
---|
1745 | <include name="**/*.xml"/>
|
---|
1746 | <exclude name="**/jonas-*.xml"/>
|
---|
1747 | <support dir="${build.classes}">
|
---|
1748 | <include name="**/*.class"/>
|
---|
1749 | </support>
|
---|
1750 | </ejbjar>
|
---|
1751 | </pre>
|
---|
1752 |
|
---|
1753 | <p>This example shows ejbjar being used to generate a single deployment jar
|
---|
1754 | using a JOnAS EJB container. This example does require the deployment
|
---|
1755 | descriptors to use the naming standard. This will create only one ejb jar file -
|
---|
1756 | 'TheEJBJar.jar'.</p>
|
---|
1757 |
|
---|
1758 | <pre>
|
---|
1759 | <ejbjar srcdir="${build.classes}"
|
---|
1760 | descriptordir="${descriptor.dir}"
|
---|
1761 | basejarname="TheEJBJar">
|
---|
1762 | <jonas destdir="${deploymentjars.dir}"
|
---|
1763 | jonasroot="${jonas.root}"
|
---|
1764 | suffix=".jar"
|
---|
1765 | classpath="${descriptorbuild.classpath}"/>
|
---|
1766 | <include name="**/ejb-jar.xml"/>
|
---|
1767 | <exclude name="**/jonas-ejb-jar.xml"/>
|
---|
1768 | </ejbjar>
|
---|
1769 | </pre>
|
---|
1770 |
|
---|
1771 |
|
---|
1772 |
|
---|
1773 |
|
---|
1774 | </body>
|
---|
1775 |
|
---|
1776 | </html>
|
---|