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 Testing and the fly likes ejb3unit and named queries on xml files 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 » Engineering » Testing
Reply Bookmark "ejb3unit and named queries on xml files" Watch "ejb3unit and named queries on xml files" New topic
Author

ejb3unit and named queries on xml files

R. Duval
Greenhorn

Joined: Sep 16, 2008
Posts: 11
Gents,

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.
hima vini
Greenhorn

Joined: Jul 16, 2012
Posts: 1
Were you able to resolve this issue?? I am facing the same issue. Please let me know how to resolve this.

Thanks
Hima
R. Duval
Greenhorn

Joined: Sep 16, 2008
Posts: 11
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: ejb3unit and named queries on xml files
 
Similar Threads
EJB3Unit: Mocked Session Bean
EJB3Unit
ejb3unit interceptors
ejb3unit
EJB3Unit