|Re: WTP Project construction question [message #214411]
||Tue, 27 May 2008 23:34
Originally posted by: merks.ca.ibm.com|
It's probably better to ask on the WTP newsgroup, which I've added to
the "to" list of the reply so that they'll see your question.
Keith Page wrote:
> This is going to be sort of...involved, so please bear with me.
> I have several servlets and JBoss services running on a JBoss 4.2
> server. I am using Eclipse 220.127.116.11 with WTP 2.0, so I can properly
> debug my servlets. I have one 'java utility' project that contains,
> among other things, practically of my database access code. When
> Eclipse deploys my servlet and service projects to my jboss, it packs
> a copy of the output of this utility project into each .war and .sar
> file. This provokes multiple class loading issues, because JBoss 4.2
> treats each copy of a particular class as a different class (with its
> own static methods and fields and such-like), but it's not the end of
> the world.
> I have a business requirement, that certain of my server actions take
> place on a separate thread, apart from any threads that a user might
> be going through (such as a separate 'email people' thread. If the
> Transport.send call throws an exception, the user can go about their
> merry way). I can use the
> org.jboss.util.naming.NonSerializableFactory object to converse with
> my server's instance of JNDI, and I can pass String commands from
> user-facing threads to a service thread. This is great, and has
> improved efficiency of certain operations tremendously.
> Here's the issue: when I'm using Eclipse (and I like to debug code in
> my dev environment), the IDE packs each servlet with its own copy of
> the utility jar. If I try to send a utility jar object from one
> servlet to a different thread running a service, I get a Object1 <>
> Object1 class cast exception. I can run the server like I would in
> production, where there's only one utility jar (in
> /server/default/lib), but then I can't debug code very well. I've
> found that if you relay on the ant javac tag with debug="true" set,
> then you only get to debug certain things (namely line execution and
> method inputs). In addition, if I leave a utility jar in my
> server/default/lib, then Eclipse uses that to compile code before it
> uses its own project code (because it doesn't understand by itself
> that one leads to the other), and I'll get weird errors where a
> servlet call to utility fails even though the utility code is fine.
> My question?
> How do I set up Eclipse so that
> a) I can get full debug powers in the development environment?
> b) I can avoid having multiple copies of my utility project scattered
> about my individual servlet environments?
> Thank you all for your time and attention. I much prefer Eclipse to
> my previous development environment, which was Notepad. Which might
> explain why I'm in this current pickle. I own a copy of the Eclipse
> WTP book, but it's for Eclipse 2.0/WTP 0.8, so it wasn't much help.
> Keith Page
Powered by FUDForum
. Page generated in 0.17409 seconds