Monthly Archives: August 2016

Use Hamcrest Matchers in JMockIt

JMockIt, when used together with Hamcrest matchers, can sometimes create very flexible verifications in unit test. This is demonstrated in the gist here. The test class GameConrollerTest defines a test target (with @Tested) and a mocked object (in this case … Continue reading

Posted in Java | Tagged , , , , | Leave a comment

Spring Bean Configure XML Accessing Context.xml JNDI Resources

Tomcat context.xml can expose environment variables accessible by Spring bean configuration xml files. Problem: Sometimes you want to externalize some application properties, such as password or QA/Production specific settings, used by Spring beans. There are a few options for doing so … Continue reading

Posted in Java | Tagged , , , , , , | Leave a comment

Use SpringBoot to Deploy ActiveMQ Broker to Tomcat-2/3

This post is to continue the first part of the same topic. It mainly covers: Use commercial database as the data store Use the embedded Tomcat to manage the data source connection pool Background Despite the fact that the ActiveMQ … Continue reading

Posted in Java | Tagged , , , , | 1 Comment

Use SpringBoot to Deploy ActiveMQ Broker to Tomcat 1/3

This topic has three parts. Also See part2 in next post and part3. ActiveMQ can be installed as a standalone server, or it can run within other containers, such as Spring or web containers. When deploying in Tomcat, you have the options of … Continue reading

Posted in Java | Tagged , , , , | 2 Comments