Hi, I am very busy but I'd like to work on it. Will keep you up to date. thank you.
Paolo. 2009/2/21 Jonathan Gallimore <jonathan.gallim...@gmail.com> > On Sat, Feb 21, 2009 at 8:20 PM, David Blevins <david.blev...@visi.com > >wrote: > > > 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 :) > > > That's absolutely right - the WTP plugin is only for the standalone OpenEJB > server. There is already a WTP plugin for Tomcat which comes with the > Eclipse JST/WST tools. > > I don't have any ideas of my own as to why Eclipse isn't hotswapping your > code, although I did wonder whether it was just a class loading issue or > something like that (but that is just a complete guess). > > > > > > 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/openejb.apache.org/tmp0/. > >> 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 :) > > > > This all sounds very interesting - I think a WTP server for Tomcat+OpenEJB > would be be very useful. The current plugin uses the DeployerBusiness EJB > in > the standalone server, and it looks like this is available in Tomcat, > perhaps we can use functionality we already have in > org.apache.openejb.eclipse.server.ServerDeployer [ > > https://svn.apache.org/repos/asf/openejb/trunk/sandbox/openejb-eclipse-plugin/plugins/org.apache.openejb.server/src/main/java/org/apache/openejb/eclipse/server/ServerDeployer.java > ] > to keep everything in sync. > > If you'd like to work on this, please do join in. I'll help you in any way > I > can. > > Jon > > > > > > > > -David > > > > > > > > Bye, > >> Paolo > >> > >> > >> On 13/02/09 05:12, "Karan Malhi" <karan.ma...@gmail.com> 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<http://tomcat.apache.org/tomcat-6.0-doc/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 < > david.blev...@visi.com > >>> >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 > >>>> > >>>> > >>>> > >>>> > >>> > >> > >> > >> > > >