I'm trying to use a hibernate JPA from my custom Nifi processor written in Java. From inside the processor i don't have any information about connection string, username, password etc (because in the Nifi it is defined in a separated service). But i have a ready java.sql.Connection object.
DBCPService dbcpService = context.getProperty(DB_CONNECTION_POOL).asControllerService(DBCPService.class);
Connection con = dbcpService.getConnection();
Now i would need somehow to get an EntityManager (or DataSource) using only the Connection object without having db parameters. Is it possible? Will appreciate help.