Forum: Building VoltDB Clients

Post: VoltDB with J2EE

VoltDB with J2EE
Nov 15, 2012

I'm building a J2EE application using JBoss 7. The application provides a number of web services, and these services interact with a VoltDB database. Currently each web service creates it's own client for DB access. Previously I was using an Oracle database and fetching a connection from a managed pool. Is the facility available using VoltDB? Indeed, is it even required? I'm trying to reduce the overhead of creating new connections for each web service call.

J2EE application using JBoss 7
Nov 16, 2012

You will get automatic connection pool management if you use the async driver and bind it to the application scope. You will need to block on the response from the async callback to take the results and render it to your page or service call.

The async driver can execute both synchronously and asynchronously. The key difference from an implementation perspective is that you have an extra parameter that specifies the async callback handler when you call either the ad hoc query or the stored procedure.

Note: the driver does not defer transaction management to the jboss container.