Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 697047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:07:40+00:00 2026-05-14T03:07:40+00:00

Starting a new project using EJB 3 / JPA, mainly stateless session beans and

  • 0

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 work pretty well. In EJB2 unit testing was a pain and required a running container such as JBoss to make the calls into. Now that we’re going to be working in EJB3 / JPA I’d like to know what companies are using to write and run these tests. Are Junit and JMock still considered relevant or are there other newer frameworks that have come around that we should investigate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:07:41+00:00Added an answer on May 14, 2026 at 3:07 am

    IMHO, yes they are still relevant.

    With EJB3, you can test you EJB either like regular POJO, or as managed bean using an embedded EJB container.

    Same for JPA, you can either embed a JPA implementation for your test and use an in-memory database, or you can mock the data layer completely.

    For my last EJB project I had written a bit of glue code to test the EJB because embedded EJB container were not mature enough, but now I would go for an embedded EJB container + JUnit.

    A few resources

    • Blog post: How to unit test EJB 3 in 0.8 seconds
    • SO question: Good unit testing resource for EJB

    But there are many others easily findable

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm starting a new project using Linux and PHP, but for the early dev
I am starting a new project using C# and ASP.NET 3.5 with SQL Server
I'm thinking about starting a new project using EF 4 and going through some
We are starting a new project to develop a website using django. We have
I'm starting a new, large server based project using .Net 4 and Visual Studio
I will be starting a new project soon and am looking for some architectural
I'm starting with a new application using silverlight and the first problem I have
When I build my project (any project, really - I tried creating a new
Been using XML for ages now for data storage & transfer, but have never
I don't have a specific question here but I'm more looking for some guidance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.