Java Code Geeks http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Wed, 27 May 2015 19:00:25 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.2 How does Hibernate READ_WRITE CacheConcurrencyStrategy workhttp://www.javacodegeeks.com/2015/05/how-does-hibernate-read_write-cacheconcurrencystrategy-work.html http://www.javacodegeeks.com/2015/05/how-does-hibernate-read_write-cacheconcurrencystrategy-work.html#comments Wed, 27 May 2015 19:00:25 +0000 http://www.javacodegeeks.com/?p=40260 Introduction In my previous post, I introduced the NONSTRICT_READ_WRITE second-level cache concurrency mechanism. In this article, I am going to continue this topic with the READ_WRITE strategy. Write-through caching NONSTRICT_READ_WRITE is a read-through caching strategy and updates end-up invalidating cache entries. As simple as this strategy may be, the performance drops with the increase of ...

 

]]>
http://www.javacodegeeks.com/2015/05/how-does-hibernate-read_write-cacheconcurrencystrategy-work.html/feed/ 0
The structure of Apache Lucenehttp://www.javacodegeeks.com/2015/05/the-structure-of-apache-lucene.html http://www.javacodegeeks.com/2015/05/the-structure-of-apache-lucene.html#comments Wed, 27 May 2015 13:00:26 +0000 http://www.javacodegeeks.com/?p=40259 The inestimably noble Apache Software Foundation produces many of the blockbuster products (Ant, CouchDB, Hadoop, JMeter, Maven, OpenOffice, Subversion, etc.) that help build our digital universe. One perhaps less well-known gem is Lucene, which, ” … provides Java-based indexing and search technology, as well as spellchecking, hit highlighting and advanced analysis/tokenization capabilities.” Despite its shying ...

 

]]>
http://www.javacodegeeks.com/2015/05/the-structure-of-apache-lucene.html/feed/ 0
Grails’ JSONObject.NULL More or Less Equal To Nullhttp://www.javacodegeeks.com/2015/05/grails-jsonobject-null-more-or-less-equal-to-null.html http://www.javacodegeeks.com/2015/05/grails-jsonobject-null-more-or-less-equal-to-null.html#comments Wed, 27 May 2015 07:00:05 +0000 http://www.javacodegeeks.com/?p=40231 Since Groovy 1.8 we can check if a Map is equal to another Map if the keys and values are the same. Very convenient in tests for example. def someMap = [age: 34, name: "Ted"] assert someMap == [name: "Ted", age: 34] Today I kept staring at a failure, while testing some x and y ...

 

]]>
http://www.javacodegeeks.com/2015/05/grails-jsonobject-null-more-or-less-equal-to-null.html/feed/ 0
My Thoughts on Gohttp://www.javacodegeeks.com/2015/05/my-thoughts-on-go.html http://www.javacodegeeks.com/2015/05/my-thoughts-on-go.html#comments Tue, 26 May 2015 19:00:32 +0000 http://www.javacodegeeks.com/?p=40230 Meh I have been working on a project that needs to run as small-footprint native code. I’ve been doing C since 1980 and have written a fair number of commercial packages in C, C++, Objective-C and blends among them. But after a couple of decades doing Java and other managed languages, I no longer want ...

 

]]>
http://www.javacodegeeks.com/2015/05/my-thoughts-on-go.html/feed/ 0
Git: Going back to a specific date time and retrospective tagginghttp://www.javacodegeeks.com/2015/05/git-going-back-to-a-specific-date-time-and-retrospective-tagging.html http://www.javacodegeeks.com/2015/05/git-going-back-to-a-specific-date-time-and-retrospective-tagging.html#comments Tue, 26 May 2015 13:00:38 +0000 http://www.javacodegeeks.com/?p=40229 I’m a fairly happy Git user :-)  It’s and excellent product and a great improvement on CVS, SVN, SourceSafe, PVCS and other systems I have used in the past. In my day to day working I’ve got into a pattern of using very simple commands like clone, commit, update, pull, push etc. But then I ...

 

]]>
http://www.javacodegeeks.com/2015/05/git-going-back-to-a-specific-date-time-and-retrospective-tagging.html/feed/ 0
Akka samples with scala and Springhttp://www.javacodegeeks.com/2015/05/akka-samples-with-scala-and-spring.html http://www.javacodegeeks.com/2015/05/akka-samples-with-scala-and-spring.html#comments Tue, 26 May 2015 07:00:48 +0000 http://www.javacodegeeks.com/?p=40204 I was looking around recently for Akka samples with Spring and found a starter project which appeared to fit the bill well. The project however utilizes Spring-Scala which is an excellent project, but is no longer maintained. So I wanted to update the sample to use core Spring java libraries instead. So here is an ...

 

]]>
http://www.javacodegeeks.com/2015/05/akka-samples-with-scala-and-spring.html/feed/ 0
Do Not Make This Mistake When Developing an SPIhttp://www.javacodegeeks.com/2015/05/do-not-make-this-mistake-when-developing-an-spi.html http://www.javacodegeeks.com/2015/05/do-not-make-this-mistake-when-developing-an-spi.html#comments Mon, 25 May 2015 19:00:39 +0000 http://www.javacodegeeks.com/?p=40203 Most of your code is private, internal, proprietary, and will never be exposed to public. If that’s the case, you can relax – you can refactor all of your mistakes, including those that incur breaking API changes. If you’re maintining public API, however, that’s not the case. If you’re maintaining public SPI (Service Provider Interfaces), ...

 

]]>
http://www.javacodegeeks.com/2015/05/do-not-make-this-mistake-when-developing-an-spi.html/feed/ 0
Getting version string from a Maven based web applicationhttp://www.javacodegeeks.com/2015/05/getting-version-string-from-a-maven-based-web-application.html http://www.javacodegeeks.com/2015/05/getting-version-string-from-a-maven-based-web-application.html#comments Mon, 25 May 2015 13:00:30 +0000 http://www.javacodegeeks.com/?p=40201 When you package a maven project, it will automatically generate a pom.properties file inside that will contains the version, artifactId and groupId information. These are handy to have and to display for your web application at runtime. One can use a method like following to retrive it. public class Application { private String version; public ...

 

]]>
http://www.javacodegeeks.com/2015/05/getting-version-string-from-a-maven-based-web-application.html/feed/ 3
Java Code Geeks and Manning are giving away FREE Big Data eBooks (worth $399)!http://www.javacodegeeks.com/2015/05/java-code-geeks-and-manning-are-giving-away-free-big-data-ebooks-worth-399.html http://www.javacodegeeks.com/2015/05/java-code-geeks-and-manning-are-giving-away-free-big-data-ebooks-worth-399.html#comments Mon, 25 May 2015 07:44:57 +0000 http://www.javacodegeeks.com/?p=40261 Want to boost your knowledge on Big Data ? Then we have something especially for you! We are partnering with Manning Publications, publisher of cool programming books, and we are running a contest giving away FREE copies of their latest Big Data eBook. Big Data teaches you to build big data systems using an architecture ...

 

]]>
http://www.javacodegeeks.com/2015/05/java-code-geeks-and-manning-are-giving-away-free-big-data-ebooks-worth-399.html/feed/ 0
Quasar and Akka – a Comparisonhttp://www.javacodegeeks.com/2015/05/quasar-and-akka-a-comparison.html http://www.javacodegeeks.com/2015/05/quasar-and-akka-a-comparison.html#comments Mon, 25 May 2015 07:00:03 +0000 http://www.javacodegeeks.com/?p=40202 The actor model is a design pattern for fault-tolerant and highly scalable systems. Actors are independent worker-modules that communicate with other actors only through message-passing, can fail in isolation from other actors but can monitor other actors for failure and take some recovery measures when that happens. Actors are simple, isolated yet coordinated, concurrent workers. Actor-based ...

 

]]>
http://www.javacodegeeks.com/2015/05/quasar-and-akka-a-comparison.html/feed/ 0