I have a JSF, EclipseLink app. I use JasperReports, to export a report I need to create a connection.
JasperPrint jasperPrint = JasperFillManager.fillReport(File, Hash Map, Connection)
I cant access my current connection (The datasource I define in the persistence xml). I have tried different ways, but the only thing that has worked is creating a new connection. I dont feel really good about hard coding the connection parameters in my code. Is there a way I can read the parameters of the datasource, so I can create the connection with the same parameters?