Brian Murphy

Author
+ Follow
since Jul 07, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brian Murphy

Hi Joe,

I would echo Kamal's sentiment: Hibernate is a really great JPA implementation which also provides a huge amount of functionality beyond the JPA spec. Because it's such a powerful framework, it can feel a bit complicated in some use cases but I think the power far outweighs the complexity. I would definitely challenge the notion that it's difficult to debug - Hibernate has really great logging which can show you an excellent trace log of what's happening in your running application. This makes it very simple to see what's actually happening and get to the root of any problems. And because it's open source, you can always pull the source into your favorite IDE and dig right into the internals with a debugger.

Cheers,

Brian D. Murphy
@brimurph
Congrats Pankaj, Tony, Christophe and Srikkanth! Thanks for your support and we hope you enjoy the book!

Cheers,

Brian D. Murphy
@brimurph
12 years ago
Hey Gian,

There are a lot of tools you can use to ward off performance problems before it's too late, both open source and commercial. If you're already using continuous integration, one great approach is to bolt JMeter into the process so that you exercise your application with enough load to simulate production use. You can then pay attention to the trends of your performance runs over time with each new build.

Here's an example of Atlassian's Bamboo integration - https://studio.plugins.atlassian.com/wiki/display/JMETAGG/Bamboo+JMeter+Aggregator+Plugin

Cheers,

Brian D. Murphy
@brimurph
12 years ago
Hey Pawan,

Do you get an error of some sort? The syntax you're suggesting does indeed work. Here's what it would look like.



Also note that you have to use unicode escapes to get UTF-8 support, or switch to using the XML format for message bundles. You can read more in the Properties JavaDocs - http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/java/util/Properties.html

Cheers,

Brian D. Murphy
@brimurph
12 years ago
Hey Gian,

We cover JUnit, the Spring TestContext framework and toss in a bit of JMock as well.

Cheers,

Brian D. Murphy
@brimurph
12 years ago
Hey Gian,

Triaging performance problems is dependent on a huge number of factors. My preference is to do all of my development with sql logging enabled so that you can catch silly mistakes early on. When a problem rears its ugly head in production that has gone undetected by my monitoring tools, I don't want to risk adding any more overhead by messing around with my application configuration until I've tracked down a decent lead. If I suspect the persistence tier is involved, I tend to look at my application caches first and then go to the database to get more intel; which queries are being executed the most, are there long running queries, etc, etc. From there you can determine whether you should be making optimizations within your database or whether you should be diving into your Hibernate configuration.

I hope that helps!

Cheers,

Brian D. Murphy
@brimurph
12 years ago
Hey Mark,

First, thanks for your interest in the book! Let me take a quick stab at your questions...

1. Does this book complement the first book?



Spring Persistence, A Running Start takes you through a wide range of persistence topics ranging from simple JDBC using JdbcTemplate to JPA/Hibernate to iBatis to JCR. The new book represents a much deeper dive into Hibernate and its internals.

If I could only afford one book, which do you suggest?



I'm hard pressed to argue with Christophe's suggestion Seriously though, folks who are new to persistence with Spring and trying to determine what framework to use may want to check out the Running Start book. For developers who are already committed to Hibernate, the upcoming book is likely the best bet.

Whats the approach in your book? Is this a one stop technical book that discusses everything or is this a book that builds a simple project and enhances it progressively?



We've taken a sample application and fleshed it out over the course of the book, so it sounds like you're in luck

Cheers,

Brian D. Murphy
12 years ago
Hey Christophe,

We've elected to use an in-memory database for all of the examples in the book so that the example code is as self-contained as possible. Our intention is to keep the prerequisites to a bare minimum so that all you need to run the sample application is JDK5+ and Maven 2. Of course, you'll need Spring Roo and Grails installed for the examples related to those sections of the book. We won't be using any proprietary database features in the examples, so switching databases should be straight forward.

I hope that helps!

Cheers,

Brian D. Murphy
12 years ago