Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

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.

10+ YEARS


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.

Performance Tuning J2EE Applications deployed on MySQL

Last week I attended Mark Matthew's "Performance Tuning J2EE Applications deployed on MySQL" at the MySQL Conference (see Anthony's Review). Mark's presentation had a lot of tips and tricks with the MySQL JDBC Driver. I asked him to send me a copy - and he did. Below are a number of tips that you might be able to use in your apps. One thing that Mark forgot to mention (he did later over beers) was that MOST apps (with less than 50 tables) won't need this stuff. You should probably only performance tune your server (or JVM) if you *really* think it's not your app or database. The database, and its indexes, is the first thing to check for slow performance.

  • To get JVM Metrics, i.e. Heap/Garbage Collection stats, add the following to your java command:
    -verbose:gc -XX:+PrintGCTimeStamps
  • The default JVM heap size is 64MB, which is likely too small for most webapps. You can change the default min/max by adding the following to your JAVA_OPTS (or CATALINA_OPTS) environment variable:
    -Xms128m -Xmx256m
  • Young generation sizing - let the JVM do it by specifying:
    -XX:+AggressiveHeap
  • Connection Pool Size: 15-20 is more than enough to handle an average application. Never have more connections than threads that can use them. For MySQL, the pool size is resource throttling, not saving connection setup time. Click here for a chart that shows the number of connections used doesn't change between a pool size of 10 and 20.
  • Connection/J 3.0 is 40-400% faster than 2.0.14 depending on the situation - use the latest driver!

Finally, here is the really good stuff. Below are a number of parameters you can add to your JDBC URL (like autoReconnect=true) to get information from MySQL's JDBC Driver:

  • Logging Slow Queries: logSlowQueries=true and slowQueryThresholdMillis=n (2000 default)
  • Reporting Performance Metrics: gatherPerfMetrics=true and reportMetricsIntervalMillis=n (30s default)
  • Usage Advisor (abandoned objects, un-used columns in selects, incomplete ResultSet traversal): useUsageAdvisor=true

Reminder: if your app doesn't have performance issues - you probably don't need to modify anything. Mark said he'd put his presentation online soon, so I won't bother doing that. I'll try to link to it when he puts it up.

Update May 25th, 2004: Mark notified me that his slides have been posted.

Posted in Java at Apr 19 2004, 08:44:25 PM MDT 2 Comments

DJUG Book Reviews

The Denver JUG is certainly a thriving community. For those of you who can't visit us for a meeting - you can still get something from us. Five new book reviews have been added to the Denver JUG web site. Two reviews cover books about automated code generation: XDoclet in Action and Code Generation in Action. The other book reviews are for Core JSTL: Mastering the JSP Standard Tag Library, Pragmatic Unit Testing in Java with JUnit and Java Extreme Programming Cookbook, which covers JUnit and other development tools.

Unfortunately, I gave up my reading aspirations for coding. I hope to get back to reading after Spring Live has been published in June. In reality, however, I'll probably never find the time to read again unless I give up contributing to open source. 24 hours in a day sucks.

Posted in Java at Apr 19 2004, 03:19:33 PM MDT 1 Comment

New PowerBooks

Apple's New PowerBooks (announced today) don't impress me. Sure it's great that you can get a 1.5 GHz processor now, but I want more. I want at least a 2 GHz PowerBook. Why? The simplest reason is easily demonstrated by the following numbers - comparing my 2.6 GHz Windows XP Deskop to my 1.33 GHz PowerBook.

AppFuse TargetPowerBookDesktop
ant compile 44 seconds 25 seconds
ant test-all 6 minutes 7 seconds 3 minutes 18 seconds

Most Mac Heads will probably cry "compare the Dual G5 and see what happens!" I tried doing this at the MySQL conference last week, but the G5s didn't have internet access so I couldn't download Ant and AppFuse to test it out. Regardless, even if I was able to test it out - the G5 is a Desktop - and I want kick-ass speed in a laptop. You can certainly buy speedy Windows laptops.

This post is not meant to be a bash on PowerBooks - I love my PowerBook and I think that Apple makes the best damn laptop hardware out there. I just wish that Megahertz did matter to Apple and they'd give us a faster laptop. Then again, I'm pumped that these PowerBooks are not G5s, 'cause then I'd want one... ;-)

BTW, I tried Jikes 1.20 to speed things up and AppFuse won't even compile. The problem seems to be a bunch of ".class has an invalid format" errors from Cactus. Sorry Jikes, you failed the 10 minute test.

Posted in Java at Apr 19 2004, 09:28:59 AM MDT 10 Comments