• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring Transaction issue

 
shiva shankar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am facing a peculiar problem in getting my prototype (non-singleton) service object, which is wrapped by the TransactionProxyFactoryBean. Even though I have declared my service object is not a singleton, the singleton transactionProxyFactoryBean provides the same service object for all requests.

Is it springs behavior?

<bean id="registryPurchaseServiceTrans" class="com.eg.RegistryPurchaseServiceImpl" singleton="false" autowire="byName">


<bean id="registryPurchaseService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
parent="transactionAwareService">
<property name="transactionManager" ref="transactionManager"/>
<property name="target" ref="registryPurchaseServiceTrans"/>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>

Any thoughts on resolving this will helpful.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Shivashankar"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic