This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes ServiceFactory, Struts2, Spring, JPA & Transactional? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "ServiceFactory, Struts2, Spring, JPA & Transactional?" Watch "ServiceFactory, Struts2, Spring, JPA & Transactional?" New topic
Author

ServiceFactory, Struts2, Spring, JPA & Transactional?

André-John Mas
Ranch Hand

Joined: Oct 18, 2008
Posts: 37
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:

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: ServiceFactory, Struts2, Spring, JPA & Transactional?
 
Similar Threads
How to inject EntityManager via setter in spring
spring wont inject the entitymanager
Please Help....NullPointerException...
Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6
Performance MDB