--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the answer. The problem I have is where should I define SuperService. The only reasonable place I can think of is an independent module, otherwise it is bound to the corresponding sqlsession in the private module. So, I've tried with a new AbstractModule, which is used in the creation of the Injector with the other two private modules. The problem I have with this approach is that the SuperService's method is not intercepted, only the nested methods and I end with tx pro nested method. I'm not sure how it is supposed to work. On the other side I saw the XATransaction interceptors in the package, but I still can't find out how they should be used - perhaps that is the missing part of the puzzle. If someone can provide an example here it would be very helpful.
TIA,
Ilko
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com<mailto:mybatis-user+unsubscribe@googlegroups.com>.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com<mailto:mybatis-user...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
, new AbstractModule() {
@Override
protected void configure() {
bind(CombinedService.class);
}
});
I've committed my sample here:It matches a configuration that you might use in a JEE container if you were not using container managed transactions. If you do plan to use container managed transactions, then you don't need any of this - the normal ExternalTransaction manager will work just fine in that case.By far the most difficult thing in making something like this work in a unit test is that you need to mimic the functions of a typical container provided transaction manager. Everything else is very straight forward.@Christian - I closed the issue I created because it works as expected in this unit test. Must have been a WebLogic configuration problem on my part.Jeff Butler
On Fri, Oct 9, 2015 at 10:41 AM, Ilko <ilkom...@gmail.com> wrote:
Hi Jeff,
thanks for the quick reply. At the moment it is a simple standalone junit test, because I need to get the injection part figured out - I think this should always work?
At the end this will be deployed in appserver (WebSphere), but I try to find a solution to use it in standalone mode as well in order to be able to use the same components in batch programs.
I'm converting my project to real sample project independent of corporate code and db here and I'll post it on github as well - I think of derby as database, because it is the closest open source match to the db2 in use here.
as soon as it is ready I'll share the link here.
On Friday, October 9, 2015 at 4:11:51 PM UTC+2, Jeff Butler wrote:
I also noticed you are not using the JTA module.I'll add my test to git a bit later today. I think it's less abstract and a bit easier to understand than the existing test code, plus it will be the basis for fixing the issue I found.One question - are you running this in some kind of container that has a transaction manager, or is it totally standalone?Jeff Butler
On Fri, Oct 9, 2015 at 10:00 AM, Poitras Christian <Christia...@ircm.qc.ca> wrote:
I don’t know if it would solve your issue, but I always inject mappers directly in the Service/DAO.
I never inject SqlSession unless I am doing a nasty hack that I cannot do with mappers.
De : <mybati...@googlegroups.com<mailto:mybati...@googlegroups.com>> on behalf of Ilko <ilkom...@gmail.com<mailto:ilkomi...@gmail.com>>
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com<mailto:mybatis-user+unsub...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
De : <mybati...@googlegroups.com<mailto:mybati...@googlegroups.com>> on behalf of Ilko <ilkom...@gmail.com<mailto:ilkom...@gmail.com>>
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com<mailto:mybatis-user...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
De : <mybati...@googlegroups.com<mailto:mybati...@googlegroups.com>> on behalf of Ilko <ilkom...@gmail.com<mailto:ilkomi...@gmail.com>>
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com<mailto:mybatis-user+unsub...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.