[jboss-user] [EJB 3.0] - Re: Question about unit testing EJB3?

Wolfgang Knauf do-not-reply at jboss.com
Thu Oct 16 05:48:10 EDT 2008


why don't you test your EJBs the same way your client would use them (connect to the server, get EJB, call methods)? This way, e.g your entity manager will work, you will use the same persistence.xml as the EJB.

The approach described in http://escx.blogspot.com/2007/03/testing-ejb3-jpa-with-maven2.html seems to ignore all the server related things like security, transactions, injection and just tests the plain EJB methods. So the tests will not be like reality.

Hope this helps


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182596#4182596

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182596

More information about the jboss-user mailing list