Search Results

Search found 3 results on 1 pages for 'staticsan'.

Page 1/1 | 1 

  • Why does tomcat like deleting my context.xml file?

    - by staticsan
    I'm developing a web-based Java application at work and (obviously) have to run it locally during development. I've figured out the Tomcat docs and have a suitable context.xml file in /etc/tomcat6/Catalina/localhost/ but every so often, Tomcat decides to delete it! Which means I have to put it back and restart Tomcat. Why does it do this? I have searched the Tomcat docs about it and am none the wiser. (Oh yes: it's not actually called context.xml but owners.xml as that's the HTTP path prefix for this application.) Update I've now seen Tomcat delete the file whilst Tomcat was running. I think I need to file a bug...

    Read the article

  • Why am I getting programs stuck in log_wait_commit under Linux?

    - by staticsan
    There is something subtly wrong with my Linux install that I just can't locate. It is Ubuntu Lucid Lynx (10.04) 64-bit. Hardware is a Dell Optiplex 960: Intel Core 2 Quad CPU, 8Gb of RAM, 2x 300Gb HDDs. /home is ext2 on one disk and everything else is on the other (/ is also ext3). I have VirtualBox running a 64-bit Vista image for Outlook calendaring, but the heavyweight apps are IntelliJ, NetBeans, MySQL and Opera. Opera also loads my mail (IMAP) of which there is over 10,000 messages. The problem is that Opera stalls for a few seconds from time-to-time. Watching the process list shows it's in log_wait_commit which means (as far as I have figured out) the filesystem is holding things up. Sometimes I can make this happen by doing a subversion update, but usually it happens for no reason I can see. It usually happens to Opera, but I've seen NetBeans go under, too. It doesn't make the app crash - it's just completely unresponsive for a few seconds. Googling has not helped. The closest I got was to remove the sync attribute in the file system. This achieved nothing. On the advice of a Linux guru friend, I lowered /proc/sys/vm/dirty_writeback_centisecs to 300, but that didn't do anything, either. And it was all he could think of. What is going on and can I fix it? (And how?)

    Read the article

  • Why do date manipulation in Java with milliseconds?

    - by staticsan
    I was recently faced with the problem of calculating the number of days from two dates in Java (without using joda, I'm afraid). Searching on the 'net shows most answers to this question say to get the milliseconds of the two days and convert that to days, which I found appalling. However, a scant few show a different approach: use a temporary variable to count how many times it takes adding 1 day to the first date to get to the second. This leaves the conversions to the code that does it best: the library. Why do so many people advocate the first? In another project, I had previously encountered numerous subtle date calculation problems involving time-zones, daylight-saving and once even leap years using seconds to do date comparisions and calculations. All these went away when all the comparison and calculation code was rewitten to use the language libraries. (This was in PHP, though, where the libraries are structured quite differently to Java.) So I'm understandably reluctant to use this "common wisdom" in the world of Java about comparing dates.

    Read the article

1