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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:38:10+00:00 2026-05-26T11:38:10+00:00

I am using the @Singleton and @Startup annotations together to create a long running

  • 0

I am using the @Singleton and @Startup annotations together to create a long running process. By using these annotation can I safely assume that my process will be a single thread running fully asynchronously?

  • 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-26T11:38:10+00:00Added an answer on May 26, 2026 at 11:38 am

    You can use these annotations just at the class-level, so I’m not sure what ‘process’ do you refer to (@PostConstruct method?)

    I don’t remember any part of the EJB 3.1 specification which talks about the required asynchronous singleton initialization.

    4.8.1 Singleton Initialization:

    (…)the bean developer can optionally configure the Singleton
    for eager initialization. If the Startup annotation appears on the
    Singleton bean class (…) the container must initialize the Singleton bean instance during the application startup sequence. The container must initialize all such
    startup-time Singletons before any client requests are delivered to
    any enterprise bean components in the application.

    It rather depends on the Application Server vendor what technique of initialization he choose. I would not assume that the loading will occur in a separate process but rather just that it will occur during server startup and before serving clients.

    ENTERED FROM COMMENTS:
    what about providing a separate asynchronous EJB method for your time-consuming operation which will be invoked from your singleton initializer EJB?

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

Sidebar

Related Questions

I'm using a singleton pattern for the datacontext in my web application so that
How would one create a Singleton class using PHP5 classes?
I have developed a small iPhone application by using singleton that I use to
I use the @Startup annotation to set entry point on the deploying process in
By using a singleton, only one instance of it can be created. Do we
How do you create multiple DB connections using Singleton pattern? Or maybe there's better
What is the benefit of using singleton instead of global for database connections in
Due to the flooding examples of implementing logger using Singleton pattern, I have just
I am using the singleton pattern in all my PHP class files. Would it
I'm using a singleton class to save all my settings info. It's first utilized

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.