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 74 KiB

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