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

  • SEARCH
  • Home
  • 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 8970521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:44:16+00:00 2026-06-15T17:44:16+00:00

I have a requirement where i have two develop two projects, one with EJB2.1

  • 0

I have a requirement where i have two develop two projects, one with EJB2.1 and one with EJB3.x.
The EJB2.1 will be an extension to an existing project hence the reason it is v2.1 and cannot be migrated to 3.x just yet.

Both projects have to be built using Maven and this is where i am struggling. Believe it or not, i have spent the last 3 days trying to find a simple example of a stateless EJB project built using Maven but have had no luck.

Here are a couple of pointers i found through googling but none of them work.

  • Create project using Eclipse

Eclipse allows you to create an EJB3 project. Latest versions dont allow you to create EJB2 projects. Also, you cant create a Maven EJB project.

  • Use the maven archetypes.

I have tried the following archetypes in Maven but none of them work

ejb2-j2ee13
ejb2-j2ee14
ejb-javaee6
ejb-jee5
ear-jee5
ejb-jee5

The above archetypes are only for EJB3 or for those that are for v2.x there will be some dependencies missing.

  • Jboss sample projects

I also found the following tutorials on the Jboss documentation http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/reference21_30/. I intend to use the EJBs on Jboss v5.1. The projects on this URL are Maven projects but they also complain about missing dependencies (The ant build does work).

If anyone can point me to where i can download a vanilla “Hello world” maven project for both EJB2.x and EJB3.x (That would run on Jboss 5.1.x) i would really appreciate it.

I have spent so much time on google and have finally decided to ask here as i am not getting anywhere. I suspect that maybe they are making it difficult to find these dependencies as they dont want people to use EJB2.x anymore. The problem is some people have no other option.

  • 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-06-15T17:44:17+00:00Added an answer on June 15, 2026 at 5:44 pm

    you really dont need the archetype for Java EE5, or JEE6 there is so little boilerplate code, that all you need is a regular java archetype and add the dependency for

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
    

    or

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>5.0</version>
        <scope>provided</scope>
    </dependency>
    

    add your beans.xml and you are done. Avoiding any JBoss depdencies is actually a good practice, as this ensures your application remains portable.

    Note: If you want to mock or use any classes from the respective javax.XXX packages, you will need to include your application server specific dependencies into your maven test scope. This is because Sun/Oracle altered the bytecode of the API jars, to guarantee nobody accidently uses these classes, instead of the ones provided by the server.

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

Sidebar

Related Questions

I have a requirement from client with two points 1. First a notification will
we have two sqlite DB's , we have a requirement to attach one to
We have a requirement in the project that we have to compare two texts
I have a requirement like communicating two vaadin portlets in Liferay. One portlet is
I have a requirement to create two different maps in C++. The Key is
Say I have two classes and have a requirement that the primary key property
Can i add two header text in Datagrid? My Requirement is to have two
I have to develop a fairly large ASP.NET MVC project very quickly and I
I have an requirement of generating two excel files at once. We are using
I have a requirement where i have create replication between two tables with different

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.