After an unsuccessful attempt to start blogging, I decided to give it another try. And while my site with my 4 blog entries was still up and running, I decided to find it a new home. I have been working with AWS for awhile now and thought that Amazon Lightsail would be the perfect location.

Getting up and running was simple. Figuring out the details took a bit more effort. I decided to compile what I learned into a single easily accessible page.

Setting up Amazon Lightsail Account

For $5 (as of this writing) you will get a basic instance with 512 MB of RAM, 1 vCPU and 20 GB SSD. Head over to https://aws.amazon.com/lightsail/ and get yourself an account. You will need a credit or a debit card to sign up but you can try it out risk free for 30 days. Once you have your account, head over to Lightsail home and create an instance. Choose your instance location, platform (Linux) and a bluepring (WordPress).

Every developer has a list of his or her useful Eclipse plugins. This is my list. This list is not meant to be complete and comprehensive. It is highly biased and opinionated list. There a lot of great plugins out there but this list falls under the “must have” for me personally.

I found this plug-in to be great for quick access to a file outside of Eclipse. “This plug-in offers tight integration of system file manager (Windows Explorer, Gnome Nautilus, KDE Konqueror, Mac Finder, …) and shell (cmd.exe, Linux/Mac terminal) in Eclipse.”

Spring has a great way to handle transactions using @Transactional annotation. However, there are a few gotchas that one needs to watch out for. Without a good understanding of how Spring treats transactions, you can run into some unexpected and undesirable behavior. For an in depth study of the topic refer to the Spring Documentation on transaction management. I will try to summarize a few important points.

1. Spring provides support for transactions using AOP Proxies

It means that you are not calling a method directly but through a proxy. This is a very important point to remember when defining transaction boundaries. In an event where a service method calls another method in the same class with a different propagation setting (PROPAGATION_REQUIRES_NEW for example), that setting will be ignored since the call is made internally. If you are not aware of the AOP concept the behavior of those methods will most likely not match your expectations.

In order to let Spring manage transactions you have to add @EnableTransactionManagement to your Java config class or if using XML configuration add
<tx:annotation-driven/> . (Don’t forget the namespace:
xmlns:tx="http://www.springframework.org/schema/tx"

Turns out I did not have @Test annotation on a method I was trying to run as a JUnit test. The interesting thing I only got that error when other methods in that test class were annotated with @Test. If there were no other methods it would throw a
"No runnable methods exception". Completely trivial but I did not immediately connect the error message to the actual cause.