Monday, January 30, 2012

Java Web App in Tomcat Dropping Sessions

Want to integrate charts into your webapp? Check out XChart.

Here's another nano-blog that will hopefully help someone solve an problem that I was dealing with today:

Problem

I upgraded Tomcat from 7.0.22 to 7.0.25 and my web application starting closing or dropping the session that was being created during a user login operation. I also noticed in my log files, which tracks sessions being created and closed that tons of sessions were being created at once.

Solution

I'm not sure why this helps or why the problem suddenly appeared in a new release of Tomcat, but what I ended up doing to solve the problem was to add <%@ page session="false" %> to all my JSP files. Apparently for each JSP file, a session is otherwise created. In my web app I have several JSPs nested inside of other JSPs, which was probably causing all the sessions to be created. Why that was never an issue before, I'm not quite sure.

I hope that helps someone!

Monday, January 23, 2012

My First Experience Buying Something with Bitcoin

I thought I would share a positive experience I recently had buying something with Bitcoin on Bitmit.net as a success story not only for Bitcoin but also as a test of the trustwothiness of Bitmit and their Escrow service. I'm not affiliated with them at all...



First the Bad News

I was the highest bidder on this Macbook @ EUR 500.05. Then some strange stuff happened as copied directly from my email to bitmit:

Today, after I placed my bid in EUR, I was shown that my winning bid was 500.05 BTC or 2665.67 EUR (Picture 1)! Yikes! But then I saw my bid in the bidding history below to be 500.05 EUR, which is makes sense.


Then, I refreshed the page, and saw that my bid was gone from the bidding history, that berlina won the auction at 481.05 EUR, and that I was out bid, which makes no sense (Picture 6).
Then maybe a half hour later, I was again the high bidder, but at a price of 552.27 EUR. The page also still said I was outbid.



I'm concerned about all the strange things I've seen: the 500.05/2665.67 BTC/EUR winning bid, then berlina having the winning bid after the fact, and then finally having the winning bid at 552.27 EUR (Picture 12).


Now the Good News

The response I received was professional and fair. They said they noticed the problems as well and were making some manual adjustments to get everything in order. They affirmed I was indeed the highest bidder and they manually set the BTC price as EUR 500.05 divided by the average price of the previous 24 hours on mtgox, which came out to BTC 92.09. They also said I could abort the whole thing if I wanted given the situation. I believe they fixed the bugs.
Jumping forward, I ended up going for it and am now typing this on my new MacBook! Although the website was very buggy, the entire system worked, and I was happy with the escrow service they provide which you can watch for updates in your account:

✓ Delivery details submitted
✓ Payment received (92.09 Bitcoin received)
✓ Item shipped (2012-01-18, 07:01)
✓ Item received (2012-01-18, 14:10)
✓ Money released


I posted this in hopes that other people will be more confident in buying and selling goods with Bitcoin and to record my experience with Bitmit for the benefit of others.
Now I'm looking for a MagSafe power supply and a micro-DVI to DVI adapter for my MacBook. Anyone have one they want to sell to me for Bitcoin?
Here is another Bitcoin auction site that I have no experience with yet at bitbid.net.

Wednesday, January 4, 2012

Check MD5 Hash on Mac OS X

The following command can be used to calculate the md5sum of a file on a Mac running OSX, functioning the same as the md5sum command in Linux...

$ md5 -r /path/to/file/filename.ext