what I just did (and it seems to work) was:
I added to one of my *entityNameHere*LocalServiceImpl a new method:
public DataSource getDataSource(){
return *entityNameHere*Persistence.getDataSource();
}
then after regen of services, I call from in the portlet:
DataSource ds = *entityNameHere*LocalServiceUtil.getDataSource()
and then get a connection from the datasource ; I am using this to get connections for a JasperReports solution
is this safe, acceptable ?
Please sign in to flag this as inappropriate.