So for the time being I've decided to forego the type override and manually annotate my properties with @Type.
For anybody where this is not an option, the only approach I could see for registering type overrides through JPA is:
- Subclass HibernatePersistence and override the create[Container]EntityManagerFactory(...) methods
- Get the Configuration instance through the Ejb3Configuration.getHibernateConfiguration() method
- Ignore the big scary warning on that method and register your types through that Configuration instance anyway
Far too ugly for my liking, and I have relatively few instances of the type in question.
If anybody has a better solution for achieving what the example in section 6.4.1 does using JPA, I (and I'm sure others) would really love to hear it.