Transcation Management in Java

Recently I encountered a great number of topics with transcation management whatever in a interview or web application.

  • How to handle read-write splitting?
  • How to handle transcation in distributed system, i.e. distributed transcation?

There are lots of Java solution in the wild, e.g. Spring transaction, Java Transaction API (JTA), JDBC, Hibernate, Java Persistence API (JPA), and Java Data Objects (JDO).

Pending...

References:

  1. http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/transaction.html

Learning Unit Test in Java

The post aims to share my some thoughts of how to learn unit test in java, I will give a little bit more insights on how I am thinking on this. Hope this will bring you more inspirations.

There are two popular testing philosophys a.k.a TDD(Test-Driven Development) & BDD(Behaviour-Driven Development), I started to search some good frameworks with BDD. I knew about BDD from javascipt testing framework, e.g. Mocha, Jasmine, so I am pretty eager to know whether there are any popular BDD frameworks in Java perspective. After reading couples of posts, JBehave and Cucumber are relatively welcomed in the community. Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language. It has been translated to over 40 spoken languages, and gains more stars on github. Moreiver, TDD is much more well-known for most Java developer like JUnit, TestNG etc.

Read More