users@glassfish.java.net

Junit testing using glassfish embedded EJBContainer

From: <forums_at_java.net>
Date: Wed, 6 Apr 2011 04:23:24 -0500 (CDT)

 Has anyone successfully tested messaging using glassfish's embedded
container on version 3.1 or 3.01? 

As I was building my project, I could test [1] my session beans and
persistence but my tests stopped working the moment I introduced queues. on
creating the EJB [2] container (EJBContainer.createEJBContainer()) I get the
following error: 
*No EJBContainer provider available, Returned null from createEJBContainer
call* 
To test my theory I deleted the Producer and Consumer and removed the xml
references on the project and the tests work. Is there an issue with
queues/topics when testing [3] with the embedded container OR has anyone
successfully tested this. 
Maybe there are additional properties to be passed to
EJBContainer.createEJBContainer() when dealing with queues??? 

 


[1] http://www.javaranch.com/unit-testing.jsp
[2] http://www.coderanch.com/forums/f-11/EJB-JEE
[3] http://www.javaranch.com/unit-testing.jsp

--
[Message sent by forum member 'patmuga']
View Post: http://forums.java.net/node/789033