Sunday, December 6, 2009

Windows Media Center?

With Mark's goading I decided to install a "media center". Why? I have no clue. I've been using a Thinkpad T40 as a media server running VLC or Media Player Classic on an external HD projector. This works fine. I guess the "media center" is optimized for this sort of situation, but at the end of it I'm not convinced that it's worth the time - unless you're going to use it as a TV tuner (which I do not) or watch Netflix (which I do not). Here's how it went:

1) I tried Windows 7 Ultimate - which was a struggle. I finally got everything running but I had a very difficult time getting the ATI Radeon Mobility 9000 drivers running. Finally I got some Vista drivers but it ended up reversing the displays and I couldn't ever get them correct. Additionally it ran a bit slow on the old Pentium 1.7 w 2gb of RAM.

2) I thought about Vista, but realized that, too, would be a resource hog. Didn't bother to check it out.

3) Given that this machine is circa 2004 I tried Windows XP Media Center Edition 2005. The install process is a bit grueling because it wants a Windows XP Service Pack 2 CD, as well. I used a VL XP CD with Service Pack 3 and it seemed happy. Then in the end it asks for some other CD - but I just popped in CD 1 and it finished. Then of course there are 100 some updates to install. So essentially at this point I'm back where I started - an XP machine except it has "Windows Media Center". Sweet! Actually it has more - it also has the "Windows Dancers". They dance above the task bar in time to the music. If you ever wonder why Microsoft is going to loose to Google it's because of things like this. It's sort of amazing that management green lighted "Windows Dancers". Anyhow there's also "party mode" for audio. I tried this later that night but it did not seem to improve the party.

There are few problems with this setup, however:
1) Windows MCE 2005 won't play DVD content out of the box. I tried a few community codec packs but Windows is still not happy with any of the MPEG2 codecs. Finally I found this. I installed this MPEG2 codec and finally Media Center is happy.
2) The next problem is that it seems to not recognize DVDs folders on the hard drive. I installed "My Movies" and in a few minutes had a really slick display with covers, etc.

Of course with MCE 2005 you can't stream Netflix like you can in Windows 7 and much of the Online content is totally outdated. If you can make Windows 7 go - it's probably a much better bet. Another option that I only scratched the surface of it http://xbmc.org/. This runs a bit slow on the T40 but seems to have potential...

Tuesday, October 20, 2009

Vanishing Eclipse CVS Decorations

I'm not sure what I installed or changed but for the past week my CVS "Label Decorations" in eclipse have gone missing - driving my almost insane since I have to switch to the synchronization view to see what I've done to the code. It took me a while just to figure out that they're called "Label Decorations" and there are a whole bunch of options under Preferences->Team->CVS->Label Decorations. I toyed with this to no avail. But finally I've figure out the trouble. Something had turned off the "Label Decorations" in the Package view. To solve the problem:
1) Select a project in the package view
2) Choose Window->Preferences
3) Look at General->Appearance->Label Decorations
4) Make sure that CVS is checked

Thursday, October 8, 2009

Tomcat Locked Resources

So I spent a few minutes the other day setting up a nice ant task to deploy my war file to Tomcat automatically. It worked the first time, but not the second time - because Tomcat still had some jars locked down in the WEB-INF directory. Today I finally figured out a solution to the problem. One can add this the following attributes to the META-INF/context.xml file to solve the trouble...

antiJARLocking
If true, the Tomcat classloader will take extra measures to avoid JAR file locking when resources are accessed inside JARs through URLs. This will impact startup time of applications, but could prove to be useful on platforms or configurations where file locking can occur. If not specified, the default value is false.

antiResourceLocking
If true, Tomcat will prevent any file locking. This will significantly impact startup time of applications, but allows full webapp hot deploy and undeploy on platforms or configurations where file locking can occur. If not specified, the default value is false.
Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668.
Please note that setting this flag to true in applications that are outside the appBase for the Host (the webapps directory by default) will cause the application to be deleted on Tomcat shutdown. You probably don't want to do this, so think twice before setting antiResourceLocking=true on a webapp that's outside the appBase for its Host.

the above from http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

In a minimal sense:
<Context antiJARLocking="true" antiResourceLocking="true" />

is all you need.