# How to kill session ?, problem to attach Sesion

**URL:** <https://techcommunity.softwareag.com/t/how-to-kill-session-problem-to-attach-sesion/201761>\
**Category:** Forum\
**Tags:** Mainframe-Integration, ApplinX\
**Created:** [November 19, 2018, 4:21pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-session-problem-to-attach-sesion/201761 "2018-11-19T16:21:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Garcia6](https://avatars.discourse-cdn.com/v4/letter/c/9f8e36/32.png) [@Carlos\_Garcia6](https://techcommunity.softwareag.com/u/Carlos_Garcia6)\
**Post date:** [November 19, 2018, 4:21pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-session-problem-to-attach-sesion/201761/1 "2018-11-19T16:21:20Z")

</div>

Hi to all, I´m new en Applinx and I have a problem.

I have a project where sessions are opened, but when I want to recover it there are occasions where I receive the message “Session is Attached”.

It is possible to kill a session if it can not be recovered.

I have this method by attach sessions :

```auto

public SesionApplinx attachSesion(String serverURL, String applicationName, String sesionId) throws ApplinxException {
		SesionApplinx nuevaSesionApplinx = new SesionApplinx(serverURL, applicationName);
		try {
			nuevaSesionApplinx.setClientBaseObject(GXClientBaseObjectFactory.getBaseObject(new GXAttachToSessionRequest(serverURL, sesionId)));
			nuevaSesionApplinx.setCreateSessionRequest(new GXCreateSessionRequest(serverURL, applicationName, sesionId, "", "", "", ""));
			nuevaSesionApplinx.setPantallaActiva(nuevaSesionApplinx.getClientBaseObject().getScreen());
			return nuevaSesionApplinx;
		} catch (GXGeneralException e) {
			throw new ApplinxException(e);
		}
	}
```

But when I do:

```auto
nuevaSesionApplinx.setCreateSessionRequest(new GXCreateSessionRequest(serverURL, applicationName, sesionId, "", "", "", ""));
```

An exception occurs.

I can´t attach the session them I can´t close it. There is some way to kill it ?

Regards and sorry for my english

---

<div class="post-metadata">

**Author:** ![Gadi](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/gadi/32/16051_2.png) [@Gadi](https://techcommunity.softwareag.com/u/Gadi)\
**Post date:** [November 17, 2019, 9:23am UTC](https://techcommunity.softwareag.com/t/how-to-kill-session-problem-to-attach-sesion/201761/2 "2019-11-17T09:23:44Z")

</div>

This issue has been addressed and fixed recently.  
Which version are you using?

---

<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:41pm UTC](https://techcommunity.softwareag.com/t/how-to-kill-session-problem-to-attach-sesion/201761/3 "2021-04-02T15:41:49Z")

</div>


