0

Colleagues,

Could you please help me to resolve the following issue?

I have JAVA EE application. That contains a few Message Driven Bean with business logic and a few managerial beans that responsible for different aspects of configuration of entire application. I would like to setup the order of bean startup and initialization. It means the Message Driven Bean should not be called by container until managerial beans complete initialization of application. Initialization of application includes reading and parsing a few configuration files and it take us some period of time.

  • Are there WebSphere configuration options for this?
  • Or it should be done programmatically tricks only?

1 Answer 1

1

It'd depend on how things are packaged for this approach to work, but it's possible it could help. In the administrative console under "Applications" -> "WebSphere Enterprise Applications", select your app name, then select "Manage Modules". That should bring up a list of the EJB and web modules in your application. When you select one, the module's configuration page will include a "Starting Weight" value, which specifies when it starts - modules with lower weights will start first. It defaults to 5000 for all modules, but there's no real rules for magnitude, so simply pick some numbers and order them however you need.

1
  • Thanks I see your point. There is dependency between configuration bean and MDB. Is MDB affected by this approach? From other hands if configuration bean has the highest priority but queue has a message that addressed to particular MDB.
    – Alexander
    Sep 25, 2017 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.