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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content