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

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