Sunday, December 25, 2016

Embedded entities and collections in Hibernate JPA

Sometimes the JPA model may differ from the database model. The JPA model may include embedded entities and embedded collections of entities.
The embedded entity is a Java class, which encapsulates mapping of a group of columns without binding to the particular table. The same embedded entity may be used in different JPA entities.

Sunday, December 18, 2016

My favorite JPA tutorial

I never worked with JPA and I had very tight schedule in the project. This JPA Tutorial - The ULTIMATE Guide was the best starting point I could imagine.
Even now, when I have certain experience with JPA, I always use it as a reference.
Of course nothing can replace the official hibernate documentation.

Saturday, December 10, 2016

Injecting Akka actors in Play with Guice

Actors are created by passing a Props instance into the actorOf factory method of the ActorSystem. This factory method will not work if an actor constructor has arguments, which should be injected.
Akka way for actors dependency injection is with IndirectActorProducer interface (see Akka documentation.).
If the dependency injection framework is Guice, Play makes some things under the veil and suggests another pattern for injecting Akka actors.

Saturday, December 3, 2016

Practical guide to Guice - part 2

This post sequels the previous one. It explains how to define multiple bindings, what is AssistedInject and how it may be used for dynamic injection.

About the author

My Photo
I trust only simple code and believe that code should be handsome. This is not a matter of technology, but professional approach, consolidated after years of software development. I enjoy to cause things working and feel very happy, when I manage to solve a problem.
Back to Top