Announcement Announcement Module
No announcement yet.
Spring-data PersistenceProvider and Jboss Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring-data PersistenceProvider and Jboss


    I just faced a problem for which I can not find a solution.
    Crucial moments of setup are the following: Hibernate 3.x / Jpa, Jboss 6.x, Spring-data 1.0.0.M2

    EntityManagerFactory is provided by Jboss and retrieved via jndi lookup.

    And here is the problem: entityManager that ends up in the context has type "org.jboss.ejb3.entity.InjectedEntityManagerFactor y", and ofc, JpaRepositoryFactory from spring-data can not recognize it as HibernateEntityManager and thus, fails to PersistenceProvider.GENERIC_JPA which is not what i want, since it does not support query extraction.

    Is there any solution workaround? I need query-extraction working.

  • #2
    Have you thought about filing a ticket against JBoss AS asking the guys whether they could expose the native EntityManager interface? As workaround you could wrap the instance you get into yet another proxy (sigh) and expose HibernateEntityManager with it.