For quite some time I've used ejb3unit to test my EJB3 entities, but now I decided to give it a try to test the integrated session beans (I often use spring-test features althought it causes some testing configuration overhead).
Well, making a long history short I've faced a problem regarding named queries declared on xml mapping-files. Since it builds its own persistence context, of course it will never know what orm files I'm using, but that's an issue for the architecture I'm working on.
Can you guys think in a workaround for that? Is there any hidden hack to declare some classpath mapping file inside a BaseSessionBeanFixture test instance?
Any help will be very appreciated.
Joined: Jul 16, 2012
Were you able to resolve this issue?? I am facing the same issue. Please let me know how to resolve this.
Joined: Sep 16, 2008
No, I wasn't and gave in before losing any more time with that.
I decided to use Spring Test instead, even knowing it would be an overkill to set up everything.