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)
    • 7
    • 6
    • 5
    • 4

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