We recently added Seam to our stack, which was previously JPA/Spring/Richfaces. Seam is awesome in handling conversations, and works perfectly with Spring. However, there is something missing that I would like to inquire about:
In Spring, we were instantiating a LocalContainerEntityManagerFactoryBean as our EntityManagerFactory, we had several jar projects that were either referenced as (project-x/classes) or (project-x.jar) depending on whether or not you are working from inside eclipse. So we had a PersistenceUnitPostProcessor hooked up that would take a list of project names as input, and then scans the classpath for matches for those names and adds the complete class path entry to the PersistenceUnit list of jar files to be scanned for annotations. This worked perfectly, it also eliminated the need to hardcode paths in the jar-file entry of persistence.xml. Now that we are using seam for conversations, we switched to a Seam managed EMF and are using SeamManagedEntityManagerFactoryBean to hook into spring, so my question is, is there a way to hook into the persistence unit and add classpath entries the same way PersistenceUnitPostProcessor works in spring?
Solved this by creating 2 EMF definitions in spring, one that I passed to seam to use and one that I got back from seam and am using for conversation support. This way, original EMF passed to seam can make use of my post processor, while all spring objects get the seam EMF which handles conversations.