source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/docs/manual/OptionalTasks/ejb.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

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