Search code examples
javaejbwebsphereear

Call method after ear start


I need to run ejb component and call a method after start application as early as possible. Does anyone know best solution, please help.


Solution

  • I am assuming it's a EJB application, in that case you can use singleton session bean, it can be used for application initialization in a portable, vendor-independent way.

    And if it's a Web application then you need to use ServletContextListener