Skip to content

Object Lifetime

Philippe Marschall edited this page Oct 12, 2016 · 9 revisions

We recommend you create one instance of the stored procedure interface and use it for the entire lifetime of your application. We do not recommend creating an instance of the stored procedure interface interface every time you call a stored procedure.

There are two reasons for this. First creating a new instance involves creating a proxy with puts pressure on Metaspace. Second we cache meta information about a call so the second time we do no longer need perform reflection and allocate fewer objects.

Clone this wiki locally