|
|
||
Alexander Saint Croix' BlogProgramming ArchivesPersistence of JScience components a no-go?Posted by saintx on February 10, 2008 at 10:05 AM | Permalink | Comments (7)When I first stumbled upon the JSR-275 standard units RI at JScience.org last autumn, I was very impressed with its careful design and eager to use it in my projects. That was before I began working on JPA persistence annotations for my data model. Now I regret using this otherwise wonderful package, for I've become entrenched in an ugly decision between shedding JScience.org dependencies entirely and reimplementing, annotating a partial branch of JScience.org for use in my project, or building some kind of bridging data class and corresponding transformer layer. Neither option is attractive. Lesson learned. Mastering EJB transaction control with . . . Lambda?Posted by saintx on February 09, 2008 at 09:54 AM | Permalink | Comments (1)My friend David Blevins showed me a great trick the other day. I was writing some in-container tests for an EJB/JPA application I'm working on, and needed some power tools to better control the scope of my transactions. After no small amount of pain, I became comfortable with the idea of increasing the similarity of the tests. That is to say, the tests needed to more carefully reflect the actual usage scenario that end users would encounter. Key to this was the concept of units of work. The mechanism he showed me for acheiving this very closely mimics Lambda notation from languages like LISP. | ||
|
|