• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ANT - ejbjar - need to add support files

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello folks,

I've been in the process of upgrading our IDE to weblogic workshop,
and have been working on implementing ANT as our build process.
Below is a snippet from an *existing* makefile which is used
specifically in this case to create an EJB using MAKE:

# INCLUDE JAVA FILES THAT ARE REQUIRED FOR THE EJAVA BEAN FILES

ENTITY_BEAN_FILES=CaseAssignment.java \
CaseAssignmentBean.java \
CaseAssignmentHome.java \
CaseAssignmentPK.java \
CaseAssignmentSeq.java \
CaseAssignmentShadow.java \
CaseAssignmentState.java \
CaseAssignmentMapInfo.java


Now, in ANT, deployment descriptors expect standard entity bean files,
based on the xml-schema (class/bean/home/PK).

Since ANT is more dynamic in this regard, there is no way that I can
determine to add the following to this particular EJB (and approximately 140 more like it):

CaseAssignmentSeq.java \
CaseAssignmentShadow.java \
CaseAssignmentState.java \
CaseAssignmentMapInfo.java


I have tried to approach this from a deployment descriptor standpoint, from an ejbjar (build.xml) standpoint, but it doesn't seem I can add files this way.

The next two initially promising ways, won't work for our application:

ejbjar - 'Support' (initially the most promising..however...)
from apache.org, quote "Note that when ejbjar generates more than one jar file, the support files are added to each one", ejbjar is generating about 140 ejbs, each ejb needs only about three to four support files....this means using support gives each ejb ...way too many files.

ejbjar - 'Dependencies' (none/super/full, I tried both super/full and they're adding way too many files to each ejb.)


Any help would be greatly appreciated!


P.S.
For reference, the following is the ejb compile/deployment section of

my build.xml using ant:

<ejbjar naming="ejb-name" srcdir="${rel.modules.dir}/build"
descriptordir="${rel.modules.dir}/build"
<include name="**/ejb-jar.xml"/
<exclude name="**/*weblogic*.xml"/
<weblogic
noEjbc="true"
compiler="java"
destdir="${rel.prod.dir}/wldomain/aces-
desktop/autodeploy/aces"

classpath="${rel.modules.dir}/lib/j2ee.jar:${rel.modules.dir}/lib/clas
ses12.jar:${rel.modules.dir}/lib/bcel-
5.2.jar:${rel.modules.dir}/lib/xerces.jar:${rel.modules.dir}/lib/xalan
.jar:${rel.modules.dir}/lib/xsu12.jar:${rel.modules.dir}/lib/xmlparser
v2.jar:${rel.modules.dir}/lib/sax2.jar:${rel.modules.dir}/lib/oraclexs
ql.jar:${rel.modules.dir}/lib/ojdbc14.jar:${rel.modules.dir}/lib/CocoD
eploy45.jar:C:\bea92\weblogic92\server\lib\weblogic.jar:${rel.modules.
dir}/build"

</ejbjar>
<echo>Compiling EJB's on server(weblogic)</echo>
<echo...</echo>
<taskdef name="wlappc"
classname="weblogic.ant.taskdefs.j2ee.Appc"
classpath="C:\bea92\weblogic92\server\lib\weblogic.jar:${rel.modules.d
ir}/build"/>
<wlappc verbose="true" nowarn="true"
Source="${rel.prod.dir}/wldomain/aces-desktop/autodeploy/aces">
classpath="${rel.modules.dir}/lib/j2ee.jar:${rel.modules.dir}/lib/clas
ses12.jar:${rel.modules.dir}/lib/bcel-
5.2.jar:${rel.modules.dir}/lib/xerces.jar:${rel.modules.dir}/lib/xalan
.jar:${rel.modules.dir}/lib/xsu12.jar:${rel.modules.dir}/lib/xmlparser
v2.jar:${rel.modules.dir}/lib/sax2.jar:${rel.modules.dir}/lib/oraclexs
ql.jar:${rel.modules.dir}/lib/ojdbc14.jar:${rel.modules.dir}/lib/CocoD
eploy45.jar:C:\bea92\weblogic92\server\lib\weblogic.jar:${rel.modules.
dir}/build"
/>
 
Ben Haschalk
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I spent long hours researching the solution and unfortunately found noone that's come into this problem elsewhere, so I'm posting my solution for anyone that runs into this problem.

The problem is that the ejbjar task has no way of adding these extra files to specific ejbs. (<support> does do this, but it adds EVERY support file to EVERY ejb, I needed ejb specific files added to each specific ejb)

The JAR task, however, does.
First I ran ejbjar (with noEjbc="true"), then ran wlappc to compile the ejbs, then finally, using the update="true" parameter in the JAR task, I was able to add each file to each ejb, which added many lines to my build.xml but in the end, it worked. Here is a code example:

<jar update="true" destfile="${rel.prod.dir}/wldomain/aces-desktop/autodeploy/aces/aces.dataAccess.entities.dhs.acesVendor.AcesVendor.jar"
basedir="${rel.modules.dir}/build" includes="aces/dataAccess/entities/dhs/acesVendor/AcesVendorMapInfo.class, aces/dataAccess/entities/dhs/acesVendor/AcesVendorSeq.class, aces/dataAccess/entities/dhs/acesVendor/AcesVendorShadow.class, aces/dataAccess/entities/dhs/acesVendor/AcesVendorState.class"
/>
 
We're all out of roofs. But we still have tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic