codes to run
ClassPathResource res = new ClassPathResource(
"alp-context-local.xml");
XmlBeanFactory factory = new XmlBeanFactory(res);
UnderrattelseService urs = (UnderrattelseService) factory.
getBean("underrattelseService");
System.exit(urs.underratta());
similar codes to run the other bean. Note that execution will not even enter method underratta().
The two beans used to work well for a long time, then "suddenly" application of rulebased for transaction invokes and causing rollback!
I have been starring at the beandef.xml for many many minutes ... I didn't check the code changes because the problem arises at entry underratta().
I appreciate any clues or response ! Thanks.
So your saying when you call the method on one service it works and on the other it causes a rollback? Have you debugged UnderrattelseService to see why it causes the rollback? Something might actually be going wrong in this service.
you see the execution will not go into UnderrattelseService, it does a rollback because a rule check was performed. This rule check was not performed for godkannPaminnService (and therefore godkannPaminnService can run and complete).
The two services have almost identical definition in beandef, this puzzles me.
/Kwan
The two attached files are debug logs for the two services.
As you can see that they are almodt identical, except for underrattaelseService a rule check applies just before entry into the class. (do a search on "rule" in these logs).