EJB « Test « JPA Q&A





1. Best current framework for unit testing EJB3 / JPA    stackoverflow.com

Starting a new project using EJB 3 / JPA, mainly stateless session beans and batch jobs. I've used JUnit in the past on standard Java webapps and it seemed to ...

2. How to unit testing EJBs when using JPA2?    stackoverflow.com

How would you go about unit testing an EJB that uses JPA? For example, if I have an Order entity and and OrderEJB that is supposed to calculate the total of ...

3. Testing an EJB with JUnit    stackoverflow.com

How should I test an EJB 3.1 which gets an instance of EntityManager injected? A possible EJB:

@Stateless
@LocalBean
public class CommentService {

    @PersistenceContext
    private EntityManager em;

   ...

4. Unit test for EJB3    stackoverflow.com

I would like to setup unit and integration for ejb3 (entity/jpa). I'm using Eclipse, Maven, and Jonas server. It seems that easybeans is what I need for integration test. Where can I ...

5. How to run tests with Arquillian IN_CONTAINER mode with Hibernate    stackoverflow.com

I'm in the middle of reading EJB 3, second edition by manning and am having a tough time running tests on the source in IntelliJ Test is: Full Source can be found

6. EJB with Hibernate works when tested, but not when deployed    forums.netbeans.org

I am building an EJB that uses Hibernate. I have written tests for all of my entities and when I run the tests, everything works great: Hibernate connects to my database and pulls data like it should. However, when I deploy to the embedded GlassFish server, I will get this error when using getNamedQuery():