OutOfMemoryErrors after migration

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
If you have Java™ API for XML Web Services (JAX-WS) applications, you might see java/lang/OutOfMemoryError errors after you migrate from a previous version of IBM® Business Automation Workflow.
Heap analysis shows that the org.apache.axis2.description.AxisService is the main contributor to this condition, as shown in the following stack:
2,115,840,672 (48.54%)[88]9 org/apache/axis2/context/ConfigurationContext 0x99b8aa38
            2,115,838,152 (48.54%)[176]33 org/apache/axis2/engine/AxisConfiguration 0x96f59228
              2,030,303,824 (46.57%) [48]1 java/util/concurrent/ConcurrentHashMap 0x96f59708
                [..]2,030,303,776 (46.57%)[80]16 array of java/util/concurrent/ConcurrentHashMap$Segment 0x99b8cc88
                      1,774,689,352(40.71%)[32]2 java/util/concurrent/ConcurrentHashMap$Segment 0x96f5c5f0
                         [..]1,774,689,296(40.71%)[4,112]375 array of java/util/concurrent/ConcurrentHashMap$HashEntry 0x1104b7dd0
                              302,843,912(6.95%)[24]3 java/util/concurrent/ConcurrentHashMap$HashEntry 0x114b92370
                              284,064,808(6.52%)[24]2 java/util/concurrent/ConcurrentHashMap$HashEntry 0xcfc63250

More memory is required because the default behavior of JAX-WS applications changed between WebSphere® Application Server V6, V7, and V8. Because Business Automation Workflow relies on WebSphere Application Server, you might see this problem when you migrate WebSphere Application Server with Business Automation Workflow.

Note: The recommended property jaxws.share.dynamic.ports.enable was introduced in WebSphere Application Server V7 with PM63537: ADD SHARE_DYNAMIC_PORTS_ACROSS_SERVICES JVM PROPERTY IN V7 External link opens a new window or tab, but it is not enabled by default.
To resolve the problem, revert the behavior so that dynamic ports are again shared across service instances, by setting the JVM custom property:
jaxws.share.dynamic.ports.enable = true