You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ejb.html 68 KiB

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