What are the @PreConstruct and @PostConstruct annotations used for?

Solution Unverified - Updated -

Issue

  • What is meant by @preconstruct and @postconstruct
  • Is it possible to use these features to get DB connection and release resources?

Environment

  • EJB3
  • Jboss Enterprise Application Platform (EAP)
    • 4.3.0.GA_CP07

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.