You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(68) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(75) |
Feb
(84) |
Mar
(89) |
Apr
(96) |
May
(52) |
Jun
(73) |
Jul
(99) |
Aug
(46) |
Sep
(40) |
Oct
(46) |
Nov
(45) |
Dec
(25) |
2004 |
Jan
(13) |
Feb
(74) |
Mar
(40) |
Apr
(18) |
May
(31) |
Jun
(1) |
Jul
(16) |
Aug
(1) |
Sep
(21) |
Oct
(19) |
Nov
(10) |
Dec
(16) |
2005 |
Jan
(4) |
Feb
(12) |
Mar
(46) |
Apr
(33) |
May
(64) |
Jun
(1) |
Jul
(60) |
Aug
(31) |
Sep
(26) |
Oct
(24) |
Nov
(37) |
Dec
(10) |
2006 |
Jan
(3) |
Feb
(31) |
Mar
(122) |
Apr
(22) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(8) |
Nov
(3) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(8) |
From: Brian G. <br...@qu...> - 2004-09-11 02:07:05
|
> | However, one could add logic to only start this thread, if the functionality > | to remove templates from the cache after some time is actually used (e.g. > | ExpireTime is set to a positive value). > > YES! YES! YES!!! If you had paid attention, you'd see I actually did this in the last major overhaul. And I was thinking of you when I did it. |
From: <cha...@da...> - 2004-08-17 20:36:38
|
Null is a fairly common - and often valid value to be returned from a getter (or set with a setter). Here is the template declaration: displayName: $customer.DisplayName customer is a Customer object that has been put to the context and has a getDisplayName method. The default behavior on template.write for a null value translation is as follows: description: <!-- Value is null: $customer.Description at c:\projects\wrxj\src\com\skdaifuku\server\servlet\webmacro\jat.wm:12.17 --> Can I somehow configure this to simply insert an empty string (i.e. "") instead of the error- as this is not really an error and having to map null to empty strings would be un-natural to regular java object handling of null values? Chad |
From: <Web...@St...> - 2004-07-22 09:33:23
|
On Wed, 21 Jul 2004, Sebastian Kanthak wrote: | On Tuesday 20 July 2004 10:40, Endre St=F8lsvik wrote: | > If the templates were put into the cache using "soft references" .. | | they are, see WebMacro.defaults: | | # Advanced properties: | ReloadingCacheManager.*.UseSoftReferences: TRUE Eh.. okay..! 99% of my email's point vanished by that..! But, why are a thread being used for expiration at all? One could add the template with a timestamp, and then compare this timestamp with "now", an= d decide whether to use it or not based on this comparison. The softness of the referencing would ensure that memory were never depleted. The only reason for firing up a thread would be in development or possibl= y debugging, as to get some idea of what the "working set" of templates was at any given point - but this is more of a special optional feature.. | | > | BTW, the thread is started by a class in the concurrent package, an= other | > | _library_... ;) | > | > Well, another bad library! ;) | > | > Really, I don't like libraries that fire up Threads w/o me asking in | > particular for it. A program with millions of Threads, where each hav= e one | > specific stupid little chore. | [snip] | > And, btw, I do know that the concurrent package is very nice, but fir= ing | > up Threads here and there and everywhere is really bad in my opinion, | > anywhichway - one immediately get such problems as we now face. | | to be fair to that library: If you instantiate a ClockDaemon object and | provide it with a ThreadFactory, you more or less expect it to start th= reads, | don't you? ;) Of course! As I said, the concurrent package is very nice and all, but still, Threads are (often) evil! And thus it is webmacro that gets the blame: it uses threads, by default, w/o any real need for it. This can cause problems. | | > | However, one could add logic to only start this thread, if the | > | functionality to remove templates from the cache after some time is | > | actually used (e.g. ExpireTime is set to a positive value). | > | > YES! YES! YES!!! | > | > Ehh.. I'd love to see this functionality implemented.. ;) | > (As a first step) | | I just checked this today and found, that this is actually is the behav= iour of | 2.0b1. Just put this line into your WebMacro.properties and WebMacro wo= n't | fire up any threads, as far as I can see. | | ReloadingCacheManager.*.ExpireTime: -1 Okay - what about my suggestion above: let this be the default, but don't -use- templates that are older than "ReloadWhenOlderThan"? One question, not much related: Are specific settings higher in priority than more general? (from WebMacro.defaults :) --------- # Larger bucket size for the PropertyOperator cache seems to speed test r= uns StaticSMapCacheManager.PropertyOperator.CacheBuckets: 10001 [.. chop ..] StaticSMapCacheManager.*.CacheBuckets: 1001 --------- Thanks for nice answers, Endre |
From: Sebastian K. <seb...@mu...> - 2004-07-21 16:16:23
|
On Tuesday 20 July 2004 10:40, Endre St=F8lsvik wrote: > If the templates were put into the cache using "soft references" .. they are, see WebMacro.defaults: # Advanced properties: ReloadingCacheManager.*.UseSoftReferences: TRUE > | BTW, the thread is started by a class in the concurrent package, another > | _library_... ;) > > Well, another bad library! ;) > > Really, I don't like libraries that fire up Threads w/o me asking in > particular for it. A program with millions of Threads, where each have one > specific stupid little chore. [snip] > And, btw, I do know that the concurrent package is very nice, but firing > up Threads here and there and everywhere is really bad in my opinion, > anywhichway - one immediately get such problems as we now face. to be fair to that library: If you instantiate a ClockDaemon object and=20 provide it with a ThreadFactory, you more or less expect it to start thread= s,=20 don't you? ;) > | However, one could add logic to only start this thread, if the > | functionality to remove templates from the cache after some time is > | actually used (e.g. ExpireTime is set to a positive value). > > YES! YES! YES!!! > > Ehh.. I'd love to see this functionality implemented.. ;) > (As a first step) I just checked this today and found, that this is actually is the behaviour= of=20 2.0b1. Just put this line into your WebMacro.properties and WebMacro won't= =20 fire up any threads, as far as I can see. ReloadingCacheManager.*.ExpireTime: -1 Sebastian =2D-=20 Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |
From: Sebastian K. <seb...@mu...> - 2004-07-20 09:07:21
|
Hey Mark, On Monday 12 July 2004 18:42, Mark Crocker wrote: > Tomcat 4.1.x seems to have a problem removing a web application that > actively uses webmacro 1.1final. Auto deployment seems to be broken for > related reasons. I just checked this with wm1.1final and Tomcat 5 on linux, which seems to work fine. I was using the example HelloWorldServlet and when I removed the web-app, everything went away, including the threads and the web-app directory. Could you tell us a little bit more about your environment/webapp. Sebastian -- Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |
From: <Web...@St...> - 2004-07-20 08:40:48
|
On Mon, 19 Jul 2004, Sebastian Kanthak wrote: | On Monday 19 July 2004 18:39, Endre St=F8lsvik wrote: | > How about getting rid of the Threads, ALL of them?! BE GONE!!! | | hey, calm down :) ;) | | > I mean, WebMacro is a -library-. If I want it to use any cache manage= r | > that use threads, I'll start those myself, and kill them afterwards t= oo. | > Although I cannot understand what the good point about this would be:= why | > not use a WeakHashMap or other weak-style references for the cache? T= he | > default config and impl of the -library- WebMacro is, should most | > definately be -lean- and -mean-, not fire up any unhandled -threads-!= ! | > ( Not to mention that thread that updates a "time" long, I think it= was | > for logging: that must be the most .. useless .. piece of "performanc= e | > optimization" ever devised: in a production environment, how many | > log-lines are one to expect from WebMacro? The potential synchronizat= ion | > costs must be thousand-folds worse than the millis-getting, -if- ther= e was | > an impact in any way.. ) | | well. As you've perhaps noticed, Brian removed the clock thread in 2.0b= 1, so | no need to worry about it anymore. The only thread remaining is the one | responsible for removing templates from the cache after a given period = of | time and I'm afraid there is no other possibility than to do this with = a | thread. MAJOR POINT: Why do you have to remove the cached templates? See, this is my entire question. WHY do we have a Thread that removes the templates, this in particular in a production environment? Memory issues? If the templates were put into the cache using "soft references" .. http://java.sun.com/developer/technicalArticles/ALT/RefObj/index.html http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=3Dget_topic&= f=3D15&t=3D000179 .. then this would be the best for a production environment, by far. And you'd not need the Thread. The -even better- thing would be to have som "call-in" method into the Broker (or the thingy holding the cache) that I could invoke that says "clear all caches, please, completely". We wouldn't need the Thread!! The Thread is good in development setting, due to how the macro(-files) apparently are implemented. This because a macro-file won't be "reload-checked" at all, and thus will be stale forever - so I set the reload-time to 3 seconds while developing. But I'd prefer to switch cache= s on deployment, and use a Soft or Weak reference cache, that just loaded and loaded and loaded and used up -all- memory. See the comment #3 by "Member #862" in the above-mentioned javaranch-link= : "free memory is _bad_". The logic is that if you have 2 GBs of RAM (which isn't that uncommon), then why have to load -any- templates of disk? Why not just have them precompiled and ready to go -always-? The memory -will= - get freed when there isn't enough memory for the working set of normal activities. And Reading this: http://www.axlrosen.net/stuff/softreferences.html I realize that what I want is a -soft- reference cache, not a weak. Weak is .. weaker .. than soft! So soft-cache it is. | | BTW, the thread is started by a class in the concurrent package, anothe= r | _library_... ;) Well, another bad library! ;) Really, I don't like libraries that fire up Threads w/o me asking in particular for it. A program with millions of Threads, where each have on= e specific stupid little chore. OT, There should be some "cron"- and dispatch-based "TaskRunning" syste= m that was embedded "in the JVM" (read: standard java), in addition to a event-queue that one could inject events into, and subscribe listeners to= . (I have made these features as services within the portal-server our company makes, and developers actually use it and like it a lot.) And, btw, I do know that the concurrent package is very nice, but firing up Threads here and there and everywhere is really bad in my opinion, anywhichway - one immediately get such problems as we now face. | | However, one could add logic to only start this thread, if the function= ality | to remove templates from the cache after some time is actually used (e.= g. | ExpireTime is set to a positive value). YES! YES! YES!!! Ehh.. I'd love to see this functionality implemented.. ;) (As a first step) To solve my tomcat-reload-problem (if it really is WebMacro that doesn't clean its Threads on reload/redeploy) in development sceniarios, I could actually just use NO cache, if it is impossible to get the macro-thingys to "reload-check" also. | | > So WebMacro isn't cleaning up after itself? I've always had a problem= with | > my webapplication "leaking memory" when i restart it dozens of times, | > eating up my 64 MB "developer sized memory" for Tomcat after 10-12 | > restarts. So WebMacro is the one to blame? And it won't get better in= the | > next version either? | | 1.1final is stopping all threads and garbage collection should take car= e of | the rest, I think, but apparently something does not work (see Mark's | problem) completely. I have huge memory-leaking when reloading, as mentioned, but I have reall= y no idea to where this might be, but -have- been suspicious towards WebMacro due to the annoyance-Threads being fired up and .. hangin' out. | | > On a tangent: How's the next version coming along?! ;) | | well, at least we have some traffic on the list again. :) | | Regarding the next version: Do we have some functionality to make globa= l | "macro-libraries" available via WebMacro.properties, so that template a= uthors | do not need to include them in every template? If not, I'd like to add = this | functionality. I think that 2.0 should be shipped a year ago, approx. So, do not add mor= e functionality to it now, just get it out the door. Now, please, now! Add this kind of functionality to a 2.1 release. Thanks, Endre |
From: Lane S. <la...@op...> - 2004-07-19 18:01:53
|
> > >Regarding the next version: Do we have some functionality to make global >"macro-libraries" available via WebMacro.properties, so that template authors >do not need to include them in every template? If not, I'd like to add this >functionality. > I have implemented a global includes facility. It is optional and the name in the context is user-specified. I think there may be some complexities for macros but I would love to see this as well. Lane > >Sebastian > > > -- Lane Sharman Enterprise and Personal Email Content Filtering and Hosting http://www.opendoors.com 858-755-2868 |
From: Sebastian K. <seb...@mu...> - 2004-07-19 17:30:09
|
On Monday 19 July 2004 18:39, Endre St=F8lsvik wrote: > How about getting rid of the Threads, ALL of them?! BE GONE!!! hey, calm down :) > I mean, WebMacro is a -library-. If I want it to use any cache manager > that use threads, I'll start those myself, and kill them afterwards too. > Although I cannot understand what the good point about this would be: why > not use a WeakHashMap or other weak-style references for the cache? The > default config and impl of the -library- WebMacro is, should most > definately be -lean- and -mean-, not fire up any unhandled -threads-!! > ( Not to mention that thread that updates a "time" long, I think it was > for logging: that must be the most .. useless .. piece of "performance > optimization" ever devised: in a production environment, how many > log-lines are one to expect from WebMacro? The potential synchronization > costs must be thousand-folds worse than the millis-getting, -if- there was > an impact in any way.. ) well. As you've perhaps noticed, Brian removed the clock thread in 2.0b1, s= o=20 no need to worry about it anymore. The only thread remaining is the one=20 responsible for removing templates from the cache after a given period of=20 time and I'm afraid there is no other possibility than to do this with a=20 thread. BTW, the thread is started by a class in the concurrent package,=20 another _library_... ;) However, one could add logic to only start this thread, if the functionalit= y=20 to remove templates from the cache after some time is actually used (e.g.=20 ExpireTime is set to a positive value). > So WebMacro isn't cleaning up after itself? I've always had a problem with > my webapplication "leaking memory" when i restart it dozens of times, > eating up my 64 MB "developer sized memory" for Tomcat after 10-12 > restarts. So WebMacro is the one to blame? And it won't get better in the > next version either? 1.1final is stopping all threads and garbage collection should take care of= =20 the rest, I think, but apparently something does not work (see Mark's=20 problem) completely. In 2.0b1 Brian broke this cleanup functionality, but=20 that's what a beta is for, isn't it? > On a tangent: How's the next version coming along?! ;) well, at least we have some traffic on the list again. :) Regarding the next version: Do we have some functionality to make global=20 "macro-libraries" available via WebMacro.properties, so that template autho= rs=20 do not need to include them in every template? If not, I'd like to add this= =20 functionality. Sebastian =2D-=20 Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |
From: Lane S. <la...@op...> - 2004-07-19 17:21:12
|
> > >| >| Sebastian >| >| PS: I've just integrated WebMacro into the Spring project >| (www.springframework.org) for a project, it fits in really nicely. If people >| are interested, I could commit this into CVS. > Sebastian, I would be very interested if you could place into the contribs repository your work with Sping. thanks, -Lane |
From: <Web...@St...> - 2004-07-19 16:40:01
|
On Mon, 19 Jul 2004, Sebastian Kanthak wrote: | On Thursday 15 July 2004 08:17, Mark Crocker wrote: | > I doubt this is simply a case of tomcat forgetting to close a resource for | > the webmacro.jar file because there are several other jars in that lib | > directory that get used and deleted just fine. | | hm, I'm suspecting one of the strange CacheManager we were using in 1.1final, | but I'm not completely sure. I'll look into it when I've some time. Mark, do | you use any special settings that could be related to the behaviour, or is | everything from WebMacro.defaults? | | I just tested it with 2.0b1 and Tomcat 5 and undeploying works fine, except | there is a thread remaining. It is the thread started by ClockDaemon from the | concurrent package (used by the reloading cache manager). | | The problem is, that the Provider.destroy() method is never called by the | Broker. A while back I added a reference counting scheme to the broker, that | took care of destroying all providers and additional threads when the last WM | client was destroyed. | | However, Brian removed this from 1.36 to 1.37, declaring it as a "hack" (okay, | that's what it was), but did not create any replacement. I just hacked | something together locally, where I manually destroy the providers and then | everything works just fine, Tomcat can undeploy the webapp and no threads | remain. | | I have two ideas, how to solve this: | | 1) Put the reference counting scheme back in place. The disadvantage is, that | servlet writers have to call wm.close() on all WM instances they aquire. | | 2) Use a ServletContext listener. It could create a Broker on startup, | register it in the servlet context under a well-known name and destroy the | broker on shutdown. Disadvantages: Users have to set this listener up in | their web.xml and it does not help for stand-alone mode. | | | Suggestions? How about getting rid of the Threads, ALL of them?! BE GONE!!! I mean, WebMacro is a -library-. If I want it to use any cache manager that use threads, I'll start those myself, and kill them afterwards too. Although I cannot understand what the good point about this would be: why not use a WeakHashMap or other weak-style references for the cache? The default config and impl of the -library- WebMacro is, should most definately be -lean- and -mean-, not fire up any unhandled -threads-!! ( Not to mention that thread that updates a "time" long, I think it was for logging: that must be the most .. useless .. piece of "performance optimization" ever devised: in a production environment, how many log-lines are one to expect from WebMacro? The potential synchronization costs must be thousand-folds worse than the millis-getting, -if- there was an impact in any way.. ) Regarding 1): I think garbage collection could handle that kind of cleanup. The .close() method isn't totally far off, but I can't see the use for it, except for terminating those .. (off-pissing) .. threads. So WebMacro isn't cleaning up after itself? I've always had a problem with my webapplication "leaking memory" when i restart it dozens of times, eating up my 64 MB "developer sized memory" for Tomcat after 10-12 restarts. So WebMacro is the one to blame? And it won't get better in the next version either? Ok.. On a tangent: How's the next version coming along?! ;) It is really time that someone releases it - I fear that WebMacro will totally die soon. | | Sebastian | | PS: I've just integrated WebMacro into the Spring project | (www.springframework.org) for a project, it fits in really nicely. If people | are interested, I could commit this into CVS. All such stuff is good, put it in the sandbox! Endre |
From: Lane S. <la...@op...> - 2004-07-19 16:37:03
|
The only idea I have at this time is to remove the WebMacro.properties=20 file from the war file and place it in your servlet classpath like=20 classes/ and see if this happens. Perhaps, a file open to a war file??? -Lane Mark Crocker wrote: >On Tue, 13 Jul 2004 08:58:07 -0700, Lane Sharman wrote: >=20 > =20 > >>Mark Crocker wrote: >> =20 >> >=20 > =20 > >>>On Mon, 12 Jul 2004 13:02:55 -0400, Brian Goetz wrote: >>> =20 >>> >>>>Mark Crocker wrote: >>>> =20 >>>> > > =20 > >>>>>Tomcat 4.1.x seems to have a problem removing a web application that= actively uses webmacro 1.1final. Auto deployment seems to be broken for= related reasons. >>>>> =20 >>>>> > > =20 > >>>>>Is there a definitive fix or work-around for this problem or could s= omeone supply a concrete example of how to use the ServletContextListener= to shut down webmacro's background threads? >>>>> =20 >>>>> > > =20 > >>>>Is the webmacro.jar in the web app lib/ directory, or the server-wide= =20 >>>>lib/ directory? >>>> =20 >>>> > > =20 > >>>The path is ${CATLINA_HOME}/webapps/${MY_APP}/WEB-INF/lib/webmacro.jar= =2E >>> =20 >>> > > =20 > >>Can you identify which thread is running and not shutting down using a = >>debugger? >> =20 >> > >Great idea! Thanks for the suggestion. > >Unfortunately, no, it doesn't seem to show any orphanned or zombie threa= ds. > >If I install the webapp, I can see it create a new thread. Immediately = stopping and removing it works just fine and removes both the new thread,= the .war file and the corresponding expanded directory. =20 > >Things are a little different if I actually run a servlet that uses webm= acro before stopping and attempting to remove the servlet. Once run, web= macro does start up two threads, org.webmacro.util.TimeLoop$TimeLoopThrea= d and org.webmacro.util.Clock$ClockThread. Simply stopping the webapp do= es kill the three corresponding threads as expected. However, the 'Remov= e' action in the tomcat manager removes everything EXCEPT for the webmacr= o.jar file in the WEB-INF/lib directory. When I try it in Windows 2000, = the OS won't even let me manually delete the project directory or webmacr= o.jar file, complaining of a sharing violation, even though the applicati= on has been stopped. Re-installation also fails even though the tomcat m= anager claims that the second install succeeded. The only recourse at th= is point is to stop tomcat, manually delete the project directory contain= ing the lone jar file and restart tomcat. > >I doubt this is simply a case of tomcat forgetting to close a resource f= or the webmacro.jar file because there are several other jars in that lib= directory that get used and deleted just fine. > >Any other suggestions would be greatly appreciated. > >-- > __ =20 > __ / /\ =20 > / /\/ / /_ ------------------------------------ > / / \/ / /\ Mark Crocker =20 > / / /\ \ \/ / http://www.markcrocker.com/~mcrocker > / / \_\/\ / ------------------------------------=20 >/__/ /\ \ \_\/ >\ \ \_\/ =20 > \ \ \ =20 > \__\/ =20 > > > > >------------------------------------------------------- >This SF.Net email is sponsored by BEA Weblogic Workshop >FREE Java Enterprise J2EE developer tools! >Get your free copy of BEA WebLogic Workshop 8.1 today. >http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick >_______________________________________________ >Webmacro-user mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-user > > =20 > --=20 Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Sebastian K. <seb...@mu...> - 2004-07-19 12:19:59
|
On Thursday 15 July 2004 08:17, Mark Crocker wrote: > I doubt this is simply a case of tomcat forgetting to close a resource for > the webmacro.jar file because there are several other jars in that lib > directory that get used and deleted just fine. hm, I'm suspecting one of the strange CacheManager we were using in 1.1final, but I'm not completely sure. I'll look into it when I've some time. Mark, do you use any special settings that could be related to the behaviour, or is everything from WebMacro.defaults? I just tested it with 2.0b1 and Tomcat 5 and undeploying works fine, except there is a thread remaining. It is the thread started by ClockDaemon from the concurrent package (used by the reloading cache manager). The problem is, that the Provider.destroy() method is never called by the Broker. A while back I added a reference counting scheme to the broker, that took care of destroying all providers and additional threads when the last WM client was destroyed. However, Brian removed this from 1.36 to 1.37, declaring it as a "hack" (okay, that's what it was), but did not create any replacement. I just hacked something together locally, where I manually destroy the providers and then everything works just fine, Tomcat can undeploy the webapp and no threads remain. I have two ideas, how to solve this: 1) Put the reference counting scheme back in place. The disadvantage is, that servlet writers have to call wm.close() on all WM instances they aquire. 2) Use a ServletContext listener. It could create a Broker on startup, register it in the servlet context under a well-known name and destroy the broker on shutdown. Disadvantages: Users have to set this listener up in their web.xml and it does not help for stand-alone mode. Suggestions? Sebastian PS: I've just integrated WebMacro into the Spring project (www.springframework.org) for a project, it fits in really nicely. If people are interested, I could commit this into CVS. -- Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |
From: Mark C. <mcr...@ma...> - 2004-07-15 06:17:17
|
On Tue, 13 Jul 2004 08:58:07 -0700, Lane Sharman wrote: > Mark Crocker wrote: >> On Mon, 12 Jul 2004 13:02:55 -0400, Brian Goetz wrote: >>> Mark Crocker wrote: >>>> Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. >>>> Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? >>> Is the webmacro.jar in the web app lib/ directory, or the server-wide >>> lib/ directory? >> The path is ${CATLINA_HOME}/webapps/${MY_APP}/WEB-INF/lib/webmacro.jar. > Can you identify which thread is running and not shutting down using a > debugger? Great idea! Thanks for the suggestion. Unfortunately, no, it doesn't seem to show any orphanned or zombie threads. If I install the webapp, I can see it create a new thread. Immediately stopping and removing it works just fine and removes both the new thread, the .war file and the corresponding expanded directory. Things are a little different if I actually run a servlet that uses webmacro before stopping and attempting to remove the servlet. Once run, webmacro does start up two threads, org.webmacro.util.TimeLoop$TimeLoopThread and org.webmacro.util.Clock$ClockThread. Simply stopping the webapp does kill the three corresponding threads as expected. However, the 'Remove' action in the tomcat manager removes everything EXCEPT for the webmacro.jar file in the WEB-INF/lib directory. When I try it in Windows 2000, the OS won't even let me manually delete the project directory or webmacro.jar file, complaining of a sharing violation, even though the application has been stopped. Re-installation also fails even though the tomcat manager claims that the second install succeeded. The only recourse at this point is to stop tomcat, manually delete the project directory containing the lone jar file and restart tomcat. I doubt this is simply a case of tomcat forgetting to close a resource for the webmacro.jar file because there are several other jars in that lib directory that get used and deleted just fine. Any other suggestions would be greatly appreciated. -- __ __ / /\ / /\/ / /_ ------------------------------------ / / \/ / /\ Mark Crocker / / /\ \ \/ / http://www.markcrocker.com/~mcrocker / / \_\/\ / ------------------------------------ /__/ /\ \ \_\/ \ \ \_\/ \ \ \ \__\/ |
From: Lane S. <la...@op...> - 2004-07-13 15:49:12
|
Mark, Can you identify which thread is running and not shutting down using a debugger? Lane Mark Crocker wrote: >On Mon, 12 Jul 2004 13:02:55 -0400, Brian Goetz wrote: > > > >>Mark Crocker wrote: >> >> > > > >>>Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. >>> >>> > > > >>>Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? >>> >>> > > > >>Is the webmacro.jar in the web app lib/ directory, or the server-wide >>lib/ directory? >> >> > >The path is ${CATLINA_HOME}/webapps/${MY_APP}/WEB-INF/lib/webmacro.jar. > >I realize that adding webmacro to the server's class path is an option, but I would like to avoid that option because it breaks the ease of installation that a nice tidy war file provides. Convincing clients that WebMacro, something they've never heard of, is a good library to build their application around is enough of a battle that giving them complicated installation instructions, that they then have to describe to their customers, is something I'd like to avoid. Although JSP has improved, my current project is tailor made for a templating engine and I'd hate to have to re-do it all because the customer does an "I told you so" after we explain that the installation is going to be a two step process for their customers. > >OT: Speaking of Log4J... I notice that webmacro's log messages actually appear in the application log file rather than the catalina.out log. I know webmacro 0.9x used to use Log4j, but 1.1final uses a home made logger. Any hints on how to configure Log4J to also log to the application log file would be appreciated ;) > > > > > >------------------------------------------------------- >This SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black Hat Briefings & Training, Las Vegas July 24-29 - >digital self defense, top technical experts, no vendor pitches, >unmatched networking opportunities. Visit www.blackhat.com >_______________________________________________ >Webmacro-user mailing list >Web...@li... >https://lists.sourceforge.net/lists/listinfo/webmacro-user > > > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: <edw...@hi...> - 2004-07-12 20:03:20
|
I will be out of the office starting 07/02/2004 and will not return until 07/13/2004. |
From: Mark C. <mcr...@ma...> - 2004-07-12 19:57:06
|
On Mon, 12 Jul 2004 13:02:55 -0400, Brian Goetz wrote: > Mark Crocker wrote: >> Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. >> Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? > Is the webmacro.jar in the web app lib/ directory, or the server-wide > lib/ directory? The path is ${CATLINA_HOME}/webapps/${MY_APP}/WEB-INF/lib/webmacro.jar. I realize that adding webmacro to the server's class path is an option, but I would like to avoid that option because it breaks the ease of installation that a nice tidy war file provides. Convincing clients that WebMacro, something they've never heard of, is a good library to build their application around is enough of a battle that giving them complicated installation instructions, that they then have to describe to their customers, is something I'd like to avoid. Although JSP has improved, my current project is tailor made for a templating engine and I'd hate to have to re-do it all because the customer does an "I told you so" after we explain that the installation is going to be a two step process for their customers. OT: Speaking of Log4J... I notice that webmacro's log messages actually appear in the application log file rather than the catalina.out log. I know webmacro 0.9x used to use Log4j, but 1.1final uses a home made logger. Any hints on how to configure Log4J to also log to the application log file would be appreciated ;) |
From: Brian G. <br...@qu...> - 2004-07-12 17:03:02
|
Mark; Is the webmacro.jar in the web app lib/ directory, or the server-wide lib/ directory? Mark Crocker wrote: > Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. > > Some threads in the list archives mention a problem with shutting down webmacro threads, but I can't find any mention of a solution beyond some discussion suggesting that a ServletContextListener might be useful somehow. > > Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? > > Thanks; > > -- > __ > __ / /\ > / /\/ / /_ ------------------------------------ > / / \/ / /\ Mark Crocker > / / /\ \ \/ / mcr...@ma... > / / \_\/\ / http://www.markcrocker.com/~mcrocker > /__/ /\ \ \_\/ ------------------------------------ > \ \ \_\/ > \ \ \ > \__\/ > > > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user |
From: Mark C. <mcr...@ma...> - 2004-07-12 16:42:22
|
Tomcat 4.1.x seems to have a problem removing a web application that actively uses webmacro 1.1final. Auto deployment seems to be broken for related reasons. Some threads in the list archives mention a problem with shutting down webmacro threads, but I can't find any mention of a solution beyond some discussion suggesting that a ServletContextListener might be useful somehow. Is there a definitive fix or work-around for this problem or could someone supply a concrete example of how to use the ServletContextListener to shut down webmacro's background threads? Thanks; -- __ __ / /\ / /\/ / /_ ------------------------------------ / / \/ / /\ Mark Crocker / / /\ \ \/ / mcr...@ma... / / \_\/\ / http://www.markcrocker.com/~mcrocker /__/ /\ \ \_\/ ------------------------------------ \ \ \_\/ \ \ \ \__\/ |
From: Tim P. <ti...@pa...> - 2004-06-06 09:27:14
|
Thanks to everyone who helped, but I was looking in the wrong place. I am moving my applications up from Apache and jserv to Apache 2 and Tomcat5. My httpd.conf contained: ProxyPass /db http://beg:8082/servlet ProxyPassReverse /db http://beg:8082/servlet This worked but resulted in my getting a new session each time. Now I have: RewriteEngine on RewriteRule ^/db/(.+)$ /begbroke/$1 [L] ProxyRequests Off ProxyPass /begbroke http://beg:8082/begbroke ProxyPassReverse /begbroke http://beg:8082/begbroke and everything is back to working order! Thanks again for those who have offered suggestions. yours Tim Pizey On Thursday 27 May 2004 15:33, Tim wrote: > Hi, > > I seem to have a problem with Webmacro 2.0 and session handling, > on Tomcat 5.0.19, 5.0.24 and 5.0.25 > > I found a post suggesting that this was a known problem with 5.0.24, > but it hasn't gone away after upgrading. > > The problem is that each servlet gets a new, empty, session object. > > Anyone else getting similar problems? > > My servlet is derived from org.webmacro.servlet.WMServlet > > yours > tim pizey |
From: Graeme J S. <web...@gj...> - 2004-05-29 09:46:30
|
On Sat, 29 May 2004, Tim wrote: > On Friday 28 May 2004 10:52, Graeme J Sweeney wrote: <snip/> >> >> Do the session ids match on successive requests ? > No, they are different. > >> >> System.err.println("session.id="+s.getId()+"@session.new="+s.isNew()); > Well I just did > System.err.println("session+session); > which prints out a different id for every servlet: > org.apache.catalina.session.StandardSessionFacade@10ca208 > org.apache.catalina.session.StandardSessionFacade@c7e8a7 This any help? http://marc.theaimsgroup.com/?l=tomcat-user&m=108452540407986&w=2 Graeme - |
From: Tim <ti...@pa...> - 2004-05-28 22:31:43
|
On Friday 28 May 2004 10:41, Nick Sanderson wrote: > Hi Tim > > have you tried this on a variety of browsers? Yes, opera, moz, konqueror all behaving the same. This is code that has worked for a long time but I have just upgraded to WM2.0 AND tomcat5 at the same time. It could be revealing an old bug in my code, but I think not, as it is being exhibittedby both Melati and jal. thanks for answering Tim |
From: Tim <ti...@pa...> - 2004-05-28 22:31:26
|
On Friday 28 May 2004 10:52, Graeme J Sweeney wrote: > On Wed, 26 May 2004, Tim wrote: > > Hi, > > > > Been stuck for a little while on a disappearing session variable > > > > In one servlet (derived from a copy of WMServlet) > > I put my User object in the session something like this: > > > > void store(WebContext c, User myUser) { > > HttpSession s = c.getSession(); > > c.setAttribute("u", myUser); > > System.err.println(s.getAttribute("u")); > > } > > which prints out a valid User object > > > > However in the next servlet called > > HttpSession s = c.getSession(); > > System.err.println(s.getAttribute("u")); > > prints null > > <snip/> > > Do the session ids match on successive requests ? No, they are different. > > System.err.println("session.id="+s.getId()+"@session.new="+s.isNew()); Well I just did System.err.println("session+session); which prints out a different id for every servlet: org.apache.catalina.session.StandardSessionFacade@10ca208 org.apache.catalina.session.StandardSessionFacade@c7e8a7 thanks tim |
From: Lane S. <la...@op...> - 2004-05-28 16:57:23
|
Greetings, WebMacro Wiki is a pluggable architecture. You create a page action handler which renders a class of pages. Not every url request defaults to the standard page renderer. For example, there is an admin class handler for url requests which begin with "Admin". I am thinking of writing a base class and calling it Record. Then, with a lot of utility call-backs in this class, a subclass could be, "Survey", "ProblemReport", "Policy", etc. Each subclass would have its own VLH storage partition. The pages would be addressable as http://www.webmacro.org/EmployeeSuggestions with varying parameters for entering a suggestion, editing one, or listing one or many. With WebMacro Version 2.0, building the form would be accomplished as a templet along with some other goodies in the file, EmployeeSuggestions.wmt. All nice and neat and tidy. This would make our WM Wiki extensible to structured records. And, if I am not mistaken, we could leverage our built-in renderers to render structured fields: a structured record could have a wiki text field, an img reference, and an http reference. eric: what do you think about adding structured records following this design pattern? Would it be hard to have a field type, "WebMacroWikiText" in a record or whatever the class it should be to contain text which was parsed and rendered? regards, -- Lane Sharman Enterprise and Personal Email Content Filtering and Hosting http://www.opendoors.com 858-755-2868 |
From: Graeme J S. <web...@gj...> - 2004-05-28 09:52:38
|
On Wed, 26 May 2004, Tim wrote: > Hi, > > Been stuck for a little while on a disappearing session variable > > In one servlet (derived from a copy of WMServlet) > I put my User object in the session something like this: > > void store(WebContext c, User myUser) { > HttpSession s = c.getSession(); > c.setAttribute("u", myUser); > System.err.println(s.getAttribute("u")); > } > which prints out a valid User object > > However in the next servlet called > HttpSession s = c.getSession(); > System.err.println(s.getAttribute("u")); > prints null <snip/> Do the session ids match on successive requests ? System.err.println("session.id="+s.getId()+"@session.new="+s.isNew()); What user agent is making the requests? Graeme - |
From: Nick S. <NSa...@ms...> - 2004-05-28 09:41:39
|
Hi Tim have you tried this on a variety of browsers? If your browser is rejecting cookies and you're not url encoding your links so that the server can use url rewriting then this would give the impression of a disappearing session. We have found this to be a problem with IIS fronting Tomcat and have to remember to url encode all the links. Nick >>> ti...@pa... 05/26/04 04:53PM >>> Hi, Been stuck for a little while on a disappearing session variable In one servlet (derived from a copy of WMServlet) I put my User object in the session something like this: void store(WebContext c, User myUser) { HttpSession s = c.getSession(); c.setAttribute("u", myUser); System.err.println(s.getAttribute("u")); } which prints out a valid User object However in the next servlet called HttpSession s = c.getSession(); System.err.println(s.getAttribute("u")); prints null Is this likely to be a Tomcat5 configuration issue or a webmacro issue, I am (fairly) sure now that it is not in my code. yours timp ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ Webmacro-user mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-user This Message has been Checked at MSXI for all known Viruses. You open this at your own risk. Please make sure all replies are also virus free. Also we do not accept or send Attachments of the type .exe, .vbs, scr, or .bat due to the virus risk they can contain. These types of attachments will be stripped from the message. MSXI |