Are the JBossWS Service and Port classes thread safe?

Solution Verified - Updated -

Issue

  • I want to cache Service and port instances since they are expensive to create. Can I safely share them between threads?
  • I discovered a problem within JBoss that objects obtained from Service.getPort are not thread safe.
  • Is the object "javax.xml.ws.Service" thread safe? Can we invoke the method getPort (...) from multiple threads simultaneously?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 5.x
    • 4.x

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.