Vita Rara: A Life Uncommon

LocalEntityManagerFactoryBean?

Hi Mark,

I'm confused about the fact that your using the LocalEntityManagerFactoryBean as your EMF implementation. According to the JavaDoc this means that you are not using the EMF provided by the Application server. Is this really what you want?

I tried to do exactly the same as you mentioned in your discussion with Colin (Spring EJB support forum). I want to use the JBoss EMF via a JNDI lookup and got the same problems (EntityManager is closed after every use of the JpaTemplate).

What happens when you mix your configuration with other DAO's that are implemented as SLSB's that use the container provided EMF? Does that mean that you got 2 persistence providers?

This is very confusing!

Bye
Martin Fischer

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options