Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

ServiceFactory, Struts2, Spring, JPA & Transactional?

Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Up until now I have been declaring all my service classes in the applicationContext.xml file and passing the service via the constructor. Doing things this way we could easily perform transactional operations, though it was decided that having a having single service factory that can be passed to the Action classes, would be a useful approach for a number of reasons, and then use that to get the services. I am now at the point where I have written the ServiceFactory, and retrieving services from it. The service factory includes the method:

The value is then delegated to the services. While all this 'works', I now find msyelf in a position where upon trying to a transaction, I get:

There is clearly something I have misunderstood and not doing, though I am not sure what that is. Could anyone help enlighten me?

Just for reference here is my ServiceFactory class:

The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!