This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
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://aspose.com/file-tools
 
subject: ejb3unit and named queries on xml files
 
Similar Threads
ejb3unit
ejb3unit interceptors
EJB3Unit
EJB3Unit
EJB3Unit: Mocked Session Bean