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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:05:23+00:00 2026-05-27T02:05:23+00:00

I am using Websphere Application Server to create a typical web application where UI

  • 0

I am using Websphere Application Server to create a typical web application where UI is JSPs, there is a Controller and a session EJB and a Database. I implemented a notification system which runs in the backround as a separate thread. I used WorkManager for that purpose.

My problem is, I want to start the WorkManager without having to create a session or an EJB instance for every single of the parallel sessions started by different users. It should not be session based.
Right now, the WorkManager thread kicks off when the EJB is instantiated, so if there are 3 connections, there are 3 WorkManager instances.

Would singleton session bean be a good idea? or is there somewhere I can put a ‘main()’ method which will be called, or something similar?

Any ideas would be appreciated.

  • 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-27T02:05:23+00:00Added an answer on May 27, 2026 at 2:05 am

    I think that you have several options:

    • Submit the work using a servlet context listener (which will be invoked when the WAR module is started/stopped).
    • Use a startup bean (WebSphere specific API) which is invoked once when the application is started/stopped.
    • Use a reference counting approach where you keep track of the number of EJB instances. You submit the work when the first instance is created (and stop it when the last instance is destroyed). Note that this will delay the start of the work until the first request to the EJB is made.
    • In WebSphere 8 (which supports Java EE 6) you could probably use a singleton session bean.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using Spring/Hibernate on a Websphere Application Server for AIX. On my Windows machine,
We're using Spring 2.5.4/Hibernate 3.2/Websphere Application Server 6.1.0.17. We've deployed the application on an
I am using IBM Websphere Application Server v6 and Java 1.4 and am trying
Hi I am using IBM Websphere application Server 7.0 trial version and the priod
What benefits do I gain by using IBM WebSphere Application Server Community Edition over
I'm using IBM RAD as the IDE and Websphere Application Server v6.0 to deploy
We are using IBM Websphere Application Server 6.1 and browser is Internet Explorer 8.
I was using WebSphere Allication Server version 7.0.0.13 in deploying my application. The war
Good day. I just want to consult about using websphere as san application server
I recently take over a web application project using websphere and log4j running under

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.