title: javaEE EAR-project something like onload or startup method
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6120831/java-ee-enterprise-application-perform-some-action-on-deploy-startup">Java EE Enterprise Application: perform some action on deploy/startup</a>  </p>
  </blockquote>
  
  
  
  <p>Is there a way to define something like a on load method for a javaEE ear server application.</p>
  
  <p>For example I use Hibernate on a JBoss EAR Server which needs one SessionFactory instance for the whole application lifetime.</p>