This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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??
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 ]