currently I'm fooling around with my Spring setup. My goal is to use JPA to get access to a Websphere datasource using it's JNDI name. I'm using Spring Data JPA to make life easier for me and worked through some tutorials to get the basic idea.
Bad thing: none of those is talking about the Spring configuration for my JPA szenario + I never worked with JPA / JDBC before. So I hope you can help me out here. I got 2 configuration files:
Since i'm using the @Transactual annotion within my code, i'm using the annotation-driven tag for the txManager. I'm just not really sure what else i should configure for the txManager and what the sessionFactory tag is doing. Is there any documentation for all supported XML tags and XML configuration at all (API is just talking about the programatic way of doing, user manual is using different examples)? Am I missing a importent tag for my szenario?
<property name="sessionFactory" ref="sessionFactory" />
<tx:annotation-driven transaction-manager="txManager" />
<bean id="eManager" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean"></bean>
Same about eManager - not sure if thats right in any way or if i even need a EntityManager since i'm using the repository.
Same thing here: don't really know what i'm doing. I know i need a persistence unit / provider. I know that many are using hibernate for this, but i would like to stay native and use pure JavaEE / Spring if possible. I'm just not sure how to configure that. Currently my project is crashing, telling me: "JPA PersistenceProvider returned null"