Testing EJB3 using glassfish embeddable container, but this call seems to return null all the time, any ideas?
//from JUnit
EJBContainer ejc = javax.ejb.embeddable.EJBContainer.createEJBContainer();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Got it to work using openejb. Here is how to get it to start openejb container for testing. Within your JUnit code, add the following (Ideally, in setUpClass)
You can now call business methods on your MyEJB object b.