One thing i can do is to move the SpringTransactionManager bean instance creation into a @Bean method, i am going to test doing this once i get my machine back...but i wish i didn't have to change anything..
On Thu, May 24, 2018 at 12:54 PM, mlekshma <[email protected]> wrote: > We are upgrading from 2.3 to 2.4 & realized that a change made in > IgniteSpringBean which is referenced in this added line in its javadoc > resulted in us moving lots of references in PostConstruct to > handleContextRefresh. > > "A note should be taken that Ignite instance is started after all other > Spring beans have been initialized and right before Spring context is > refreshed. That implies that it's not valid to reference IgniteSpringBean > from any kind of Spring bean init methods like PostConstruct. If it's > required to reference IgniteSpringBean for other bean initialization > purposes, it should be done from a ContextRefreshedEvent listener method > declared in that bean." > > However this breaks ignite spring transaction configuration configured as > per the suggestion there which i am not sure how to resolve. Basically we > have the below in the spring application xml where both IgniteSpringBean & > SpringTransactionManager are configured which was working in 2.3 but fails > to start up referencing the above change with 2.4 (i will add the exception > in a bit as my machine went down suddenly), > > <bean id="igniteSpringBean" class="org.apache.ignite.IgniteSpringBean"> > <property name="configuration"> > <bean id="grid.cfg" > class="org.apache.ignite.configuration.IgniteConfiguration"> > <property name="igniteInstanceName" value="ObjectManagerGrid"/> > <property name="clientMode" value="true"/> > ... > ... > </bean> > </property> > </bean> > > > <bean id="transactionManager" > class="org.apache.ignite.transactions.spring.SpringTransactionManager"> > <property name="igniteInstanceName" value="ObjectManagerGrid"/> > <property name="transactionConcurrency" value="PESSIMISTIC"/> > </bean> > > > <tx:annotation-driven/> > > > Any clue on how to work around this problem? > > Thanks! > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
