A fourth and final Connector/J extension point I covered in my JavaOne and Silicon Valley Code Camp presentations is load-balancing strategies. This exists in order to allow you to define behavior for balancing load across multiple back-end MySQL server instances. MySQL Connector/J’s load-balancing implementation is a simple internal connection pool. What appears to your application as a single Connection object can actually have multiple physical connections to MySQL servers underneath (one per configured host/port pair). At specific points, Connector/J will re-balance and choose another host to interface with. This extension point allows you to define how Connector/J determines …
[Read more]
Showing entries 1 to 2
Feb
24
2012
Nov
22
2011
A third built-in extension point for MySQL Connector/J is the ExceptionInterceptor interface. This is the third extension point covered in my recent JavaOne and Silicon Valley Code Camp presentations, and is very useful for diagnosing specific Exceptions encountered without modifying application-side code. This corresponds to slide #60 in my slide deck, and there are two Java files we’ll reference from my demo code:
- demo.connectorj.ExceptionInterceptorExample
- demo.connectork.plugins.ExampleExceptionInterceptor
To …
[Read more]
Showing entries 1 to 2