If a connectivity test fails during application startup and you see the following statement in the stack trace, configure a reconnection strategy for the connector:
Caused by: java.lang.InterruptedException
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:998) ~[?:1.8.0_221]
To configure a reconnection strategy for the connector in Anypoint Studio (Studio), add these lines to the Configure XML tab in the connector properties window:
<reconnection failsDeployment="true">
<reconnect count="2" frequency="5" />
</reconnection>
For example, the configuration XML for the connector might look like this after you add the reconnection strategy:
<netsuite:config name="NetSuite_Config" doc:name="NetSuite Config" doc:id="8a4f73c2-e5e1-4f5d-8978-980069828ff0" >
<netsuite:token-based-authentication-connection consumerKey="${netsuite.consumerKey}" consumerSecret="${netsuite.consumerSecret}" tokenId="${netsuite.tokenId}" tokenSecret="${netsuite.tokenSecret}" account="${netsuite.account}">
<reconnection failsDeployment="true">
<reconnect count="2" frequency="5" />
</reconnection>
</netsuite:token-based-authentication-connection>
In Studio, you can also use the Advanced tab in the connector properties window to configure a reconnection strategy. To do so, complete the following fields:
| Field |
Value |
Reconnection strategy |
Standard
|
Frequency (ms) |
5
|
Reconnection Attempts |
2
|