Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enterprise application setup on WSAD

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to port an application from VAJ 3.5 to WSAD and am wondering what the best way to set it up is. It consists of a web front end (servlets) which I've set up as a web module, support jars (such as jdom, xerces etc) which I've added as utility jars to the enterprise application. The other parts are communication components that are plain old java classes and I'm not sure what to do with these! If I set them up as utility jars for the application I can't debug through them (at least I think this is true!) and makes their development awkward. I've been told not to set them up as client components, so the only alternatives I see are either lumping everything into the web module (I'd rather not do this as there's quite a lot of code in the comms part) or setting them up as web modules. Anyone got any ideas on the best way forward??
 
Matthew Comer
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Options:
1) Set them up as a Java project. Then use the "make zip" plugin to have the compiled classes moved into a jar file in the EAR whenever the project is rebuilt. (You can put a Java project on the build path of your web project, but this does not address the need for the classes to be on the runtime classpath for the server. Making a jar and adding it to the EAR does this.) (ALSO - you'll need to reference the jar from the manifest file of your WAR - the "add module dependencies" wizard does this for you.)
2) Jar them and put them in the lib folder of your WAR. You can associate a "source jar" with the jar in WSAD so that you can debug. (Don't remember the exact steps - would need to look it up.)
Which is better? Depends. If the classes will be used by other projects, including any new web projects or an ejb project, use #1. If the classes are simply support files for the single web project, use #2.
Matt
p.s. If I hadn't just passed 157 I probably wouldn't be remembering any of this (grin).
[ May 21, 2002: Message edited by: Matthew Comer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic