tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Eclipse WTP + Tomcat Debug
Date Sat, 21 Feb 2009 20:20:18 GMT
On Feb 13, 2009, at 3:43 AM, Paolo Spadafora wrote:

> Hi,
> To answer you question: yes.
> It's because of openejb+tomcat, usually I can change a line of code  
> and see
> the new change without restart tomcat or reload the webapp.
> It does not reload the webapp, just the single class, but it depends,
> sometimes it's necessary to do a restart or reload the webapp, the  
> plugin
> somehow is able to understand that (you see "restart" in the tomcat  
> status).
> As I said in another email, where I explain a bit about WTP plugin,  
> it's
> necessary to have a plugin that takes care of a few tasks (like set
> openejb_home dynamically, set bootstrap jars and so on).
> Probably is not so difficult to extend the current wtp tomcat plugin  
> to
> handle openejb.

That's interesting.  We do have an WTP-based Eclipse plugin in  
development for OpenEJB, but I think it might be OpenEJB-standalone  
only at this point.  Jonathan, would know better -- he wrote it :)

On Feb 11, 2009, at 12:57 AM, Paolo Spadafora wrote:
> With eclipse WTP you can debug a web application without restart  
> tomcat
> (except a few cases, like changes on a struts config).
> It runs an instance of tomcat using a temp folder to deploy webapp
> (exploded) and some custom xml configuration (adds a few special  
> tags inside
> server.xml and web.xml).
> I think what we need is something like the JBoss plugin not WTP.
> The JBoss plugin does something very simple, keeps in synch your  
> webapps and
> ejbs by copying the compiled classes (and project files) under the
> deployment folder, like mywebapp.war or myejb.jar, but these are  
> folders,
> not files.
> Basically the tomcat-openejb plugin should do a few simple things:
> - start its own customized instance of tomcat with a pre-deployed
> application: openejb.war
> - keep a list of deployed application (eg: a Web Application  
> "webapp" and an
> EJB "ejb")
> - intercept changes to deployed webapp files or class compilation  
> and synch
> with tomcat copy
> - intercept changes to deployed ejb and synch with the filesystem/ 
> openejb,
> like runtime class loading/replacement
> - undeploy and clean (temp files, etc)
> For instance, for point 1, the plug-in should dynamically crate a temp
> folder where to run openejb-tomcat, set openejb home for you, set  
> bootstrap
> jars, etc. usually they do in the plug-in folder:
> eclipse/plugins/
> There is more, but I think is enough to give you an idea.

Jonathan might have a better idea what it might take to do some of  
these things.  And while we're wrangling up people, are you at all  
interested in working on it?  I bet you're already designing it in  
your head :)


> Bye,
> Paolo
> On 13/02/09 05:12, "Karan Malhi" <> wrote:
>> I am using maven-tomcat-plugin in eclipse and its working fine. I  
>> have not
>> run it in debug mode, but I have to redeploy the app if I make a  
>> change to
>> any .class or update a jar in the lib. Here is the tomcat  
>> documentation
>> which says that in development mode, tomcat would reload teh app if
>> reloadable is set to true
>> reloadable
>> Set to true if you want Catalina to monitor classes in /WEB-INF/ 
>> classes/ and
>> /WEB-INF/lib for changes, and automatically reload the web  
>> application if a
>> change is detected. This feature is very useful during application
>> development, but it requires significant runtime overhead and is not
>> recommended for use on deployed production applications. That's why  
>> the
>> default setting for this attribute is *false*. You can use the
>> Manager< 
>> howto.html>web
>> application, however, to trigger reloads of deployed applications on
>> demand.
>> The maven-tomcat-plugin also redeploys the app when I make some  
>> change.
>> I do not know much about tomcat +WTP, but seems like whether  
>> debugging or
>> not, webapp is reloaded when classes/jars change in webapp.
>> Question:- Is it because of openejb + tomcat that you have to  
>> reload the
>> webapp while debugging, or do you have to do that anyway (for a  
>> tomcat
>> instance without  openejb)?
>> On Wed, Feb 11, 2009 at 12:14 AM, David Blevins < 
>> >wrote:
>>> On Feb 3, 2009, at 2:30 AM, Paolo Spadafora wrote:
>>> To be able to work seriously I need to debug tomcat with embed  
>>> openejb
>>>> using
>>>> WTP,
>>>> I know how to do it with remote debugger but doesn't work well,  
>>>> have to
>>>> re-deploy my ejb+webapp each time.
>>> Hi Paolo,
>>> I'm not familiar with the Tomcat support in the Eclipse WTP.  If  
>>> you can
>>> tell me a bit about it that would be appreciated.
>>> Karan was mentioning something the other day regarding Eclipse/ 
>>> Tomcat and
>>> having to start/stop Tomcat after each change.  Cc'ing him as  
>>> maybe he has
>>> some info also.
>>> -David

View raw message