# Closing iControl session using java

**URL:** <https://community.f5.com/t/closing-icontrol-session-using-java/16790>\
**Category:** Technical Forums\
**Tags:** icontrol, dev, devops\
**Created:** [February 12, 2013, 8:17am UTC](https://community.f5.com/t/closing-icontrol-session-using-java/16790 "2013-02-12T08:17:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinay\_12452](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@Vinay\_12452](https://community.f5.com/u/Vinay_12452)\
**Post date:** [February 12, 2013, 8:17am UTC](https://community.f5.com/t/closing-icontrol-session-using-java/16790/1 "2013-02-12T08:17:35Z")

</div>

Hi

iControl.Interfaces iCtrlIntf = new iControl.Interfaces();

boolean bInit = iCtrlIntf.initialize(ipAddress, port, username, password);

if (bInit) {

long sessionIdentifier = iCtrlIntf.getSystemSession().get\_session\_identifier();

}

I am using above code to create an iControl Session. now i have reached the maximum limit of sessions and getting the below exception. Please help me how to close the session after use.

**Exception caught in System:⚱iControl:System/Session::get\_session\_identifier()There are too many existing user sessions. Please try later.**

Thanks,

Vinay.

---

<div class="post-metadata">

**Author:** ![Ryan\_Lamore\_804](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@Ryan\_Lamore\_804](https://community.f5.com/u/Ryan_Lamore_804)\
**Post date:** [June 3, 2013, 11:21pm UTC](https://community.f5.com/t/closing-icontrol-session-using-java/16790/2 "2013-06-03T23:21:30Z")

</div>

I’m very curious to what the answer is to this. I wish we could manually close these user sessions; although, it doesn’t look like that is possible. Do you just set the timeout low and let it timeout? Do they automatically get closed on submit\_transaction/rollback\_transaction? Input greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Kumar\_107292](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@Kumar\_107292](https://community.f5.com/u/Kumar_107292)\
**Post date:** [June 4, 2013, 12:33pm UTC](https://community.f5.com/t/closing-icontrol-session-using-java/16790/3 "2013-06-04T12:33:17Z")

</div>

Hi Ryan,

As what I have observed both pratically and going through the documentation for iControl, the session does not get closed either by submitTransaction or RollBackTransaction. It has a timeout value. Now supposing that the timeout value is 300sec, if the session is used within this 300 secs after its last used time, the session remains in active mode. The session expires once this timeout value is passed and the session is idel through out this time.
