I have converted everything in the JpaHibernateContentPersistenceService class to use JPA
native queries save the table creation and the ListRequest stuff, but that's easy. The
table creation is a bit of a problem, because you're not supposed to be doing DDL via
JPA. Are these tables actual tables we don't know anything about a deploy time?
What's the reason for creating them at runtime?
If we need to create them at runtime then I'm going to have to switch over to
injecting the DataSource (which is how it probably should have been done in the first
place if you're going to use JDBC) and grabbing a connection that way then doing all
the JDBC stuff as normal (try with resources would be helpful here but we're using
Java 6. If OpenShift supports Java 7 how about we upgrade?). The problem standing in my
way with doing that is that we don't have a common name for the datasource. My
suggestion is to create a searchisko-ds.xml file to deploy, standardize the name
(SearchiskoDS seems good) and then have maven make the changes to the searchisko-ds.xml
file depending on the profile.
Thoughts?