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 7815261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:28:15+00:00 2026-06-02T05:28:15+00:00

I understand that Apache TomEE is a regular Tomcat installation with openejb as a

  • 0

I understand that Apache TomEE is a regular Tomcat installation with openejb as a web app.

I am trying to understand how all this bootstraps. I will try and ask a few directed questions:

  • Is it important to have an application startup order ? Should openejb start before my web app, or the other way round, or does it not matter ?
  • Related to the earlier question. How does an enterprise application register it’s beans with openejb, or is it that openejb goes around hunting for enterprise applications in the same server, for EJB’s ?
  • At a very layman level, how were they able to provide openejb as the EJB container, when it is a different web app. (IIRC every webapp in Tomcat gets a different classpath and they cannot step on each other’s toes)

Any other important information.

  • 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-02T05:28:16+00:00Added an answer on June 2, 2026 at 5:28 am

    The integration is bootstrapped via this line in the conf/server.xml:

    <Listener className="org.apache.tomee.loader.OpenEJBListener" />
    

    This happens immediately at startup before any applications are started. The libraries from the <tomcat-home>/webapps/openejb/lib directory are added to the Tomcat system classloader, another listener is installed to participate in deployment and from then on out everything happens using events in the Tomcat lifecycle. Tomcat will issue several events at application startup (deploy) and shutdown. Tomcat itself uses them for deployment of servlets and essentially the integration is just more of the same. Other vendors that include Tomcat also use these hooks. From that perspective the integration is really quite boring 🙂

    The only interesting twist is putting the extra libraries in a war file. That’s really only done to make delivering the and adding the extra libraries to an existing Tomcat install as easy as possible (and as easy as possible to remove). All the libraries from <tomcat-home>/webapps/openejb/lib could just as easily go right in <tomcat-home>/lib. At which point, the only thing you might want the webapss/openejb/ war for is to be able to invoke EJBs over HTTP.

    So the short answers are:

    • Appliction startup order doesn’t matter
    • EJB Deployment happens side-by-side with Servlet deployment
    • Jars are added to the Tomcat system classloader immediately on Tomcat itself starts up

    Interesting thing to note in the other answer is that Tomcat actually starts up with only two jars in the classpath. Tomcat itself actually adds all the jars from <tomcat-home>/lib/ automatically at startup. We’re basically doing the same thing, just from <tomcat-home>/webapps/openejb/lib

    I don’t think we’ve actually tested moving the libraries into <tomcat-home>/lib/ and deleting the openejb webapp (which is called tomee.war in the coming final release), but I’ll make a note to try that. Seems like a good thing to support or maybe even do by default. You can delete the Tomcat manager and ROOT webapps, so it seems like a good idea to make it easy to delete the openejb.war as well.

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

Sidebar

Related Questions

I understand that Web Site Projects compile source on-the-fly, and Web Application Projects pre-compile
I understand thread driven that Apache uses: every connection opens up a thread and
I understand that Apache Thrift and ZeroMQ are softwares belonging to different categories, and
I understand that the Go programming language doesn't really support dynamic linking. This makes
I understand that this is a very long question, but i wanted to ask
Could someone please help me understand that why am I getting this error at
I understand that CoCreateInstance finds the COM server for the given class id, creates
I understand that in MVVM: the View knows about the ViewModel the ViewModel knows
I understand that we need to create MXML file to define a view. Suppose
I understand that when adding a column to a table containing data in SQL

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.