Autowire « Transaction « Spring Q&A





1. @Autowired and TransactionProxyFactoryBean?    stackoverflow.com

I have a repository class that is created in XML like so:

<bean id="stuffRepositoryTarget" class="my.stuff.RepositoryImpl">
 <!-- some params -->
</bean>

<bean id="stuffRepository" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" primary="true">
  <property name="target" ref="stuffRepositoryTarget" />
  <property name="transactionAttributes">
   ...

2. Proper way to autowire a Hibernate Session in a Spring Transaction JUnit test    stackoverflow.com

This question is similar to a previous one. I am trying to @Autowire a Hibernate Session in one of my Spring-JUnit-Transactional tests but I am getting this exception: java.lang.IllegalStateException: No Hibernate ...

3. Spring Transactional Parameterized Test and Autowiring    stackoverflow.com

Is there a way to get a class that extends AbstractTransactionalJUnit4SpringContexts to play nicely with JUnit's own @RunWith(Parameterized.class), so that fields marked as Autowired get wired in properly?


@RunWith(Parameterized.class)
public class Foo extends ...

4. EJB3 with Spring    stackoverflow.com

I have understood that if I use EJB in Spring context, I get all the same benefits as if I was using it in "pure" EJB3 environment, is this true? I ...

5. Spring JUnit Testing: Autowiring and Transaction Problems    stackoverflow.com

We have an existing JEE application that leverages Spring and are transitioning from xml configuration to autowiring. We just converted most of our EJBs to Spring beans, but currently still ...

6. @Autowire does not work when I add @Transactional to the DAO method    forum.springsource.org

@Autowire does not work when I add @Transactional to the DAO method I have a DAO and it extends a GenericDao when I add the @Transactional annotation to the DAO's save(object) ...

7. Transaction on autowired instance    forum.springsource.org

Transaction on autowired instance Hi, I have an entity, which has entitymanager injected that I autowire like this - CorporatePackageBeanResolver.getApplicationContext ().getAutowireCapableBeanFactory().autowireBean(th is); On that entity object, I have methods annotated with ...

8. Spring Transaction AOP breaks autowiring?    forum.springsource.org

Spring Transaction AOP breaks autowiring? When I do Where BarBean has the constructor: public BarBean(FooBean fooBean) { .... It works fine. But ...

9. @Repository, @Autowired, @Transaction not returning proxy and causes exception    forum.springsource.org

@Repository, @Autowired, @Transaction not returning proxy and causes exception Hi Spring experts, I am investigating the new features of Spring 2.5 and have come across an unusual problem wrt @Repository, @Autowired, ...





10. Problem autowiring application context in transactional JUnit 4 tests    forum.springsource.org

Jan 31st, 2008, 04:33 PM #1 Karl Goldstein View Profile View Forum Posts Private Message Junior Member Join Date Jan 2008 Posts 13 Problem autowiring application context in transactional JUnit 4 ...

11. Problems @Autowiring tests containing classes annotated with @Transactional methods    forum.springsource.org

Problems @Autowiring tests containing classes annotated with @Transactional methods We have unit tests which extend the AbstractTransactionalJUnit4SpringContextTests base class. These have @Autowired fields for spring objects. We have found that when ...

12. Strange clash @Transactional @Autowired    forum.springsource.org

Jul 29th, 2008, 05:59 AM #1 julio View Profile View Forum Posts Private Message Senior Member Join Date Nov 2006 Posts 217 Strange clash @Transactional @Autowired Hi, I'm using spring 2.5.x ...

13. @Autowired and TransactionProxyFactoryBean?    forum.springsource.org

@Autowired and TransactionProxyFactoryBean? It seems that autowire-by-type using the @Autowired annotation does not work for transactional proxies defined in XML. Does @Autowired work with the @Transactional annotation only? Or do the ...

14. Problem with @Transactional, , transactionManager and autowire    forum.springsource.org

I'm having a bizarre problem on Spring 2.5.3. I have a bean annotated with @Transactional, and am observing the following: Transactions are NOT applied with config: Code: ...

15. @Transactional vs. @Autowired    forum.springsource.org

@Transactional vs. @Autowired I'm having a very strange BeanCreationException issue while using Spring 3.0.2.RELEASE. In the little POC application I'm building, I have a controller that autowires a service. This has ...