# Attach server reconnect (JAVA ACI)

**URL:** <https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [April 1, 2017, 3:27pm UTC](https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913 "2017-04-01T15:27:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sofiane\_Sadi](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sofiane\_Sadi](https://techcommunity.softwareag.com/u/Sofiane_Sadi)\
**Post date:** [April 1, 2017, 3:27pm UTC](https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913/1 "2017-04-01T15:27:08Z")

</div>

Hello,

We are currently working on a java project and need to use EntireX to send/receive message with a partner.

We are using the Java ACI to register an attach server and replicates servers functionality, everything work fine and we can receive/respond to messages in a multi-threaded environment.

However if our application crash, we are loosing our BrokerService instance (Java ACI object) and can’t find a way to reconnect to the previously registered attach server.  
Is there a way to do so ?

Thank you,  
Sofiane.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 2, 2017, 8:29pm UTC](https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913/2 "2017-04-02T20:29:15Z")

</div>

You need to supply a user defined TOKEN value on the logon (and retain it throughout the calls). Supply the same token (and user-id) value when you reconnect after a failure and the server will re-connect. If you are using the same USER-ID to connect to EntireX Broker concurrently, then each requires its own unique TOKEN value.

See the documentation on USER-ID and TOKEN - this is from v9.12, but is applicable to earlier versions also:  
[http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-12/EntireX/9-12\_EntireX/aci/clientServer.htm#clientServer\_idToken](http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-12/EntireX/9-12_EntireX/aci/clientServer.htm#clientServer_idToken)

---

<div class="post-metadata">

**Author:** ![Sofiane\_Sadi](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sofiane\_Sadi](https://techcommunity.softwareag.com/u/Sofiane_Sadi)\
**Post date:** [April 4, 2017, 12:45pm UTC](https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913/3 "2017-04-04T12:45:14Z")

</div>

Thanks Douglas, it works perfectly !

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:38pm UTC](https://techcommunity.softwareag.com/t/attach-server-reconnect-java-aci/193913/4 "2021-04-02T15:38:11Z")

</div>


