Yep, this is the way to do it:
> Connection conn =
> serverRuntime.getDataDomain().getNode("nodeName").getDataSource().getConnection();
Also in 3.1 this API is streamlined a bit and can be rewritten as:
Connection conn = serverRuntime.getDataSource("nodeName").getConnection();
Andrus
On Feb
Hi,
I use this snippet to get a connection?
ServletContext servletContext = (ServletContext)
FacesContext.getCurrentInstance().getExternalContext().getContext();
CayenneRuntime cayenneRuntime = WebUtil.getCayenneRuntime(servletContext);
ServerRuntime serverRuntime = (ServerRuntime)cayenneRuntime
Thanks Andrus for new version of cayenne.
I have requirement,
Is it possible to get the connection object from the ObjectContext? In some
cases I want run the queries for reporting using the JDBC connectivity which
requires the Connection object.
Right now I had created the connection pool separ