Re: Re: Follow on to configuring persistence with java not spring xml

2012-11-20 Thread Jay Walters
That did the trick. Thanks. On 11/20/12, Babak Vahdat wrote: Hi You get null as Spring does one step more than you, that's: emFactory.afterPropertiesSet(); Because "LocalContainerEntityManagerFactoryBean implements InitializingBean" Look at the last line in that method where this FactoryB

Re: Follow on to configuring persistence with java not spring xml

2012-11-20 Thread James Carman
Yes, that's essential: https://github.com/jwcarman/camel-transaction/blob/master/src/test/java/com/carmanconsulting/camel/AbstractRouteBuilderTest.java On Tue, Nov 20, 2012 at 1:43 PM, Babak Vahdat wrote: > Hi > > You get null as Spring does one step more than you, that's: > > emFactory.after

Re: Follow on to configuring persistence with java not spring xml

2012-11-20 Thread James Carman
On Tue, Nov 20, 2012 at 12:19 PM, Claus Ibsen wrote: > > I think LocalContainerEntityManagerFactoryBean is meant for people > using Spring XML style. > At least Spring has this concept for xxxFactoryBean to turn XML into a bean. > It is designed for that, but I've successfully used it in non-spri

Re: Follow on to configuring persistence with java not spring xml

2012-11-20 Thread Claus Ibsen
On Tue, Nov 20, 2012 at 4:27 AM, Jay Walters wrote: > My reading of the spring xml makes me think java such as shown below will > configure the EntityManagerFactory > > JpaVendorAdapter jpaAdapter = new HibernateJpaVendorAdapter(); > BasicDataSource dataSource = new BasicDataSource();