These weeks didn’t have much time to dig into the feeds. However several useful articles appeared behind my eyes.
- Transaction strategies: Understanding transaction pitfalls – very clean explanation on what you can do wrong with transactions in your Spring, JPA, Hibernate app.
- Log Management Tools Face-Off: Splunk vs. Logstash vs. Sumo Logic – a good starting point in terms of selecting appropriate log management tool.
- Discovered a new debugging technique for the big old project where lots of configuration comes from random places you’re not aware of yet. Of course this configuration influences flow and if you’d like to check some specific steps you might spend lots of time configuring things. So the easy solution is to put breakpoints in the IDE and add expressions into the “Watches”. Attempt to execute something like “cfg.setKeywords(“1”); cfg.setKeywordsActive(true);” will occur each time the code is stopped on the breakpoint and you’ll get your configuration right away. This approach is definitely better than hardcoding some values since the code does not really change and you won’t accidentally commit these.
- GenerationType.AUTO in the base class is bad for inheritance with Hibernate.
Caused by: org.hibernate.MappingException: Cannot use identity column key generation with <union-subclass> mapping for: com.something.SuperClass
- Once the process is started it has some descriptors attached. Even if you add process user to some group – it won’t get rights automatically. You have to restart your process.
- Tomcat from Debian repo has weird libraries. I just couldn’t run JPA-based app, finally had to replace and add several libraries from the tomcat zip file downloaded from Apache
- Again got the problem when it takes ages to start Tomcat with HTTPS connector. The problem was pretty easy to solve this time since I’ve met it before. Changing /dev/random to /dev/urandom in JDK security settings fixed the problem.
- Got to a pretty interesting case when I had two data sources in the persistence.xml. One for production, another – for testing with HSQL. When running tests EclipseLink was complaining about duplicated generated classes like Request_. Finally was fixed with adding subpackage property which changed the target package for entities watched by test datasource: <property name=”eclipselink.canonicalmodel.subpackage” value=”test”/>
- Got a very interesting case from the customer which caused DBCP to hang infinitely and not releasing connections. One more confirmation that writing multithreaded code is hard.
- ab – Apache Benchmark tool. Usually I use JMeter for load testing purposes. But lately was introduced to ab by one of the colleagues. Pretty simple tool to do quick verifications. And I really like the name.
- Got a perfect chance to get deeper into Tomcat and the way configuration can be injected via JNDIA bit deeper into Tomcat^ serving static contents, injecting properties via JNDI.
- Got a chance to play with CouchDB on the real but pretty small project. It was pretty easy to integrate it with the help of Ektorp. Hopefully I didn’t make much stupid newbie mistakes.
- Put my hands on to the Clojure language. I really like some aspects of it and really hate others. However it’s definitely worth looking at to broad the vision. Unless you’re already used to the functional way of things. Even presented some aspects of it to colleagues. Looks like that presentation was not that dull like presentations on the programming languages usually are.