service « Transaction « Spring Q&A





1. Spring Transaction failed to open on service    stackoverflow.com

I wanted to set @Transactional on my services instead of my DAOs... in order to open transaction and be able to use some lazy collections within my services without getting some ...

2. Spring transaction management for execution service methods from same service    stackoverflow.com

For example we have bean service which has two methods and one of them (testA) execute another one (testB).

public class TestServiceImpl implements TestService {
...
public void testA() throws Exception {
   ...

3. How to implement a "Lock"-Layer in exisiting service structure    stackoverflow.com

current situation: I have a service with several typical service methods like create(), remove(), findXy(), .. etc. Now I want to prevent two different service calls at the same time, meaning ...

4. How to make service use particular txAdvice in Spring?    stackoverflow.com

I'm trying to upgrade my project and so I've come to transactions. This is how I did it up to now.

<bean id="userServiceTarget" class="com.forgin.service.UserServiceImpl">
    <property name="userDAO" ref="userDAO" />
</bean>

<bean id="userService" ...

5. When loading a domain object using hibernate and not modifying it, do I still need to define a spring transaction at the service layer?    stackoverflow.com

I am currently learning Spring and Hibernate and have a question on transactions: If I have an example DAO as follows:

@Override
public DatabaseObject getDatabaseObject(int id) {
   Session session = sessionFactory.getCurrentSession();

  ...

6. Transaction management for call to two service methods for a single unit of action    stackoverflow.com

We are refactoring a legacy application. The old code did something like this in a Controller method:

  • Call DAO1.update()
  • Call DAO2.update()
We’ve placed an in between a service layer, so the above code now ...

7. Spring @Transaction and WS-Transaction    stackoverflow.com

Can Spring @ org.springframework.transaction.annotation.Transactional support WS-Transaction? Here is a tutorial about JEE JTA and WS-Transaction, which is few years back. Here is another more recent ...

8. Spring nested @Transactional method and rollback    stackoverflow.com

I have a @Service class which has a @Transactional method that calls another @Transactional method on the same class. I was testing rollback behavior for this and I found that it ...

9. Service layer, transactions and reference data    forum.springsource.org

Jan 5th, 2011, 05:11 PM #1 izaak View Profile View Forum Posts Private Message Junior Member Join Date Jan 2011 Posts 3 Service layer, transactions and reference data Hi, I have ...





10. Using JPA with @Transactional on service but not oppenning a Transaction    forum.springsource.org

Using JPA with @Transactional on service but not oppenning a Transaction Hi ! I don't arrive to open transaction on service, if I put @Transactional on the DAO that's ok. I ...

11. No Transaction problem in service    forum.springsource.org

No Transaction problem in service Hello, i have an strange issue with my applicationContext and hope someone can give me a hint to solve my problem. I have a service inteface ...

12. Hibernate, Spring Web Service transaction issue.    forum.springsource.org

Hibernate, Spring Web Service transaction issue. Hi all, I have two applications. One is OrderService and another is TradeService. In trade service there is a method 'Buy' which is transactional. Issue ...

13. Web service distrubuted transactions    forum.springsource.org

Hi, I need to develop some web services that will run in distributed transactions. Does Spring We Services or Spring brings support for this? If yes, where can I read about? ...

14. Unique transaction in Spring for a service    forum.springsource.org

Unique transaction in Spring for a service Hi, I used the search form to find an answer but i don't have the correct word keys ... I am on Spring 2.5 ...

15. Aspect execute twice for Transactional Service methods    forum.springsource.org

Aspect execute twice for Transactional Service methods Hi, I want to perform some specific action when a method in a Service is executed. I create an Aspect that intercepts by execution ...

16. Maintaining individual transactions for service activations    forum.springsource.org

Maintaining individual transactions for service activations We are using spring-integration and we wish to maintain individual transaction boundaries for services which are somewhat in a pipeline fashion as below Code:





17. Transactions in service layer    forum.springsource.org

Transactions in service layer I have declarative transaction defined in the service layer as an example below. ...

18. Transaction issue in Facade + Service Layer    forum.springsource.org

In my application my sturcture is as: JSF Managed bean -->Business Delegate --> Service layer -->DAO Layer -->Database but to execute a complex business logic i have Facade and call squence ...

19. Transaction does not rollback when calling service method...    forum.springsource.org

Transaction does not rollback when calling service method... public class MyService { public void save() { save2(); } public void save2() { getDAO.insert1(); getDAO.insert2(); } } public class MyAction { public ...

20. call service method wrapped in transaction from another one?    forum.springsource.org

call service method wrapped in transaction from another one? Hi, all! I didn't find any thread with this issue! So, if someone has answered this question, please excuse-me and point me ...

21. Transaction management at service layer    forum.springsource.org

Hi all, I am new to Spring and hibernate. I have some complex operations at my service layer which requires transaction management from the service layer rather than at each DAOs. ...

22. Service without transactions fails to close Hibernate sess    forum.springsource.org

Service without transactions fails to close Hibernate sess I have a business service that has to perform reiterative queries against two Hibernate DAOs (each working against a different data source). I ...

23. Prototype Services with TransactionProxyFactoryBean    forum.springsource.org

Prototype Services with TransactionProxyFactoryBean Spring version: 1.2 I am currently trying to create prototype services using a TransactionProxyFactoryBean. The definition is according with the one described in Chapter 7.4 : Code: ...

24. consuming web services within a transaction    forum.springsource.org

consuming web services within a transaction Say I have an application that has a database that stores data, but I also update a legacy system via a web service. My first ...

25. Transactions - Access "serviceTarget" or the "service"?    forum.springsource.org

Transactions - Access "serviceTarget" or the "service"? With declarative transactions, my serviceTarget has a reference to the DAO, and the "service" is wrapped in a TransactionFactoryProxyBean as per the examples in ...

26. Question regarding wrapping service layer methods with transaction support    forum.springsource.org

Question regarding wrapping service layer methods with transaction support Hi Folks, I've gotten declarative transaction management down with regular JDBC datasources and hibernate datasources. As I'm continuing to implement my architecture ...

27. @Transactional - Single Transaction over multiple service methods    forum.springsource.org

@Transactional public void doSomething() { this.doSomethingMore(with, some, default, arguments); } @Transactional public void doSomethingMore(String arg1, String arg2, String arg3) { doSomethingDAO.doThis(); }

28. Service Layer/Transaction Management    forum.springsource.org

Spring follows good design for application design, and one of the books about good design is "Patterns of Enterprise Architecture" from Martin Fowler. For a more technical explanation, you could check ...

29. How to limit transaction for some functions of service    forum.springsource.org

How to limit transaction for some functions of service Right now I have following code snippet in my applicationcontext.xml Code: ...

30. Transaction problem calling a service exported via RMI    forum.springsource.org

May 13th, 2008, 01:41 PM #1 bouba331 View Profile View Forum Posts Private Message Junior Member Join Date Aug 2007 Location Paris Posts 25 Transaction problem calling a service exported via ...

31. Transactions & basic service layer questions    forum.springsource.org

Transactions & basic service layer questions Hi, I'm trying to get annotated transactions working with Spring 2.5, and am flipping between a couple of different exceptions whichever way I try it. ...

32. Transactions & basic service layer questions    forum.springsource.org

Transactions & basic service layer questions Hi, (This is a cross-post with post 190402, because I'm not sure if it's to do with how I'm using core spring or if it ...

33. Call two services in the same transaction    forum.springsource.org

I am using Hibernate 3.2.6 GA, Sprint 2.0.3. I make a call to create function in a service. This function call DAO and calls also create function in another service. If ...

34. Transactions propagation through services    forum.springsource.org

Aug 4th, 2008, 06:37 AM #1 Nico View Profile View Forum Posts Private Message Visit Homepage Member Join Date Jun 2007 Location Nantes, France Posts 44 Transactions propagation through services Hi, ...

35. No transaction in transactional service called from @PostConstruct    forum.springsource.org

No transaction in transactional service called from @PostConstruct Dear friends! For some reason transaction doesn't start when transactional service method is called from @PostConstruct method. Following are the context and the ...

37. all service methods should be transactions?    forum.springsource.org

If you do not access any transactional resource why bother with transactions ? Anyway, I remember that about a few years ago some people claimed that if you are only reading ...

38. Rollback in a Web service is not effective    forum.springsource.org

Rollback in a Web service is not effective Hi, we have a Web service that uses local stateless EJB session that handles the database access. We have two-layered transactions; each individual ...

39. demarcating service methods for transaction advice    forum.springsource.org

40. Single transaction through multiple service objects    forum.springsource.org

Single transaction through multiple service objects Hello. I have multiple service objects, while methods in service objects represent use cases. If I call the method from the other method in the ...

41. Mixing a Transactional service layer with ContextSingletonBeanFactoryLocator    forum.springsource.org

Mixing a Transactional service layer with ContextSingletonBeanFactoryLocator My project is currently architected as follows: projectBL - contains the domain models, DAOs, and applicationContextJpa.xml. projectService - contains service layer and applicationContextTx.xml. projectWeb ...

42. Transaction management and OSGI services    forum.springsource.org

Transaction management and OSGI services Hi, I have an application running in an OSGI container.The main class has a method like this @Transactional public void run(){ for(service svc: osgiservices){ svc.run(); } ...

43. UI and Use Case centric service lock-in?    forum.springsource.org

UI and Use Case centric service lock-in? Need some help here. I am trying to justify the use of Roo for an application I am working on but the senior architect ...

44. Implementing transaction around files storing service    forum.springsource.org

Hi, I'd like to implement a service to store files on mass storage. Let's see some code sample as follow: Code: class Something implements StoreBean { // bla bla bla some ...

45. Transactions & Expections usage between Services.    forum.springsource.org

Transactions & Expections usage between Services. Hi, sorry if this is not right forum to post this question. In one of my client's application I see this exception many times "Caused ...

46. Transactional services => BeanNotOfRequiredTypeException, should be Advice, but is Tr    forum.springsource.org

Jul 5th, 2010, 06:56 AM #1 l.pieralisi View Profile View Forum Posts Private Message Junior Member Join Date Jul 2010 Posts 12 Transactional services => BeanNotOfRequiredTypeException, should be Advice, but is ...

47. Transactions that span multiple web service calls    forum.springsource.org

Transactions that span multiple web service calls Hello all. I'm using Spring JtaTransactionManager to successfully use JBossTS JTA transaction manager to manage JTA distributed transactions in my web application. However, recently ...

48. Calling service method within Spring transaction scope.    forum.springsource.org

Calling service method within Spring transaction scope. I want to calll service method of the object which is injected into controller. within spring transaction scope (XxxService object). Is any clear method ...