• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EAR post install hook to run a class?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a standard way to tell an application server that, once it's installed an EAR, it should run a class contained therein? I'd like to be able to drop a configuration class into an EAR such that, once it's installed somewhere, it runs and sets up some local configuration.

If not a standard way, is there a Websphere specific way of doing this?

Or am I going to be limited to creating something that runs every time on startup, but does this configuration the first time only?
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I would recommend using the @Startup annotation.
Of course it will run on each server restart, but you
could use it to do some other checks or things...



reply
    Bookmark Topic Watch Topic
  • New Topic