Matt RaibleMatt Raible is a Java Champion and Developer Advocate at Okta.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

SourceForge's Release Process Sucks

Dave asked earlier today if we should move Roller to be hosted at rather than I responded with "SourceForge works for me" and didn't see any reason for a move. But after dealing with trying to release 0.8 of appfuse all night, I'm ready for something better. The release process sucks. I have to FTP files to (anonymously) and then, when the files are completed, selected them as files to release through the web UI.

The problem is that I've been trying to upload for the last 24 hours, and it keeps failing at different points in the upload process. So, here's the worst part - you can't "delete" from the FTP site - you have to release the file, and then delete it. What a pain in the ass - I've done this about 10 times now. My XP machine seems to be the source of my ftp-connection-dropping problem, so I've moved over to my Linux box. So now I'm ready to upload all my files, and look what SF gives me:

We're Sorry.
The Website is currently down for maintenance.
We will be back shortly


Posted in Java at Jun 11 2003, 11:03:26 PM MDT 9 Comments

[Hibernate] Open Session in View Pattern

I get this question a lot when folks check out my struts-resume application - so I figured I'd document it here - and then I can just send future developers a URL. The question is this:

Why do you tie your View to your Model Implementation by putting a Hibernate Session in your Service Interfaces?

I have a couple of reasons. The first reason is that I initially had ses.currentSession() and ses.closeSession() at the beginning and end of each DAO method. In fact, I found this old e-mail where you can see an example. This seemed to work for me and I was happy with it. However, I got an e-mail from Gavin (Hibernate's Lead Developer) that I was doing it all wrong. He said that I should use one session per request, rather than one on each method. Why? For performance reasons and to allow rolling back the entire session, rather than just a method. At least that's why I remember him saying.

So I refactored and implemented the Open Session in View pattern in conjunction with the Thread Local Session. You can checkout my ActionFilter and ServiceLocator for the View and ThreadLocal, respectively.

The problem now is that I pass my the Session object from my View -> Business Layer [example: UserManager] -> DAO Layer. So I'm tightly coupled with Hibernate, which I don't mind, because I really, really like Hibernate and have no plans to implement an alternate DAO (even though the architecture allows it). Even if I did choose to implement a new plain ol' JDBC DAO Layer, I can always get a java.sql.Connection from the Session using ses.connection(). Another option I've thought of is to just pass the ServiceLocator between the different layers, and call ses.currentSession() or ses.connection() when it's needed. But that seems to be the same thing I was doing before when I was opening/closing at the method level.

Comments and suggestions, as always, are welcomed and encouraged.

Posted in Java at Jun 11 2003, 02:12:31 PM MDT 8 Comments

Waterton Switchbacks

Sunrise rides are awesome. :-D

Sunrise rides are awesome. :-D

Posted in General at Jun 11 2003, 06:40:04 AM MDT Add a Comment

Posted in General at Jun 11 2003, 05:33:01 AM MDT Add a Comment

Sunrise Ride

It's gonna be a good morning!

It's gonna be a good morning!

Posted in General at Jun 11 2003, 05:28:49 AM MDT Add a Comment