source: other-projects/trunk/realistic-books/packages/AntInstaller/web/manual1.6.2/manual/OptionalTasks/ejb.html@ 19253

Last change on this file since 19253 was 19253, checked in by davidb, 15 years ago

Establishing a source code repository for Veronica's Realistic Book's software

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