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

ejb.html 68 KiB

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