Is it necessary to call close() if the InitialContext is no longer needed?

Solution Verified - Updated -

Issue

  • Why it is necessary to close the InitialContext after use
  • I did not close the created InitialContext in former JBoss versions, why I do need it now
  • There is no need to close the InitialContext if WebSphere, GlassFish or other servers are used

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.0.x
    • 6.1.x

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