Based on the forum in which you asked this, I assume you are asking for the servlet's session id. Use this:
String seessionId = request.getSession(true).getId();
If this is not what you are asking for, please define "session id of JBoss".
No no... the session that you say is a session of a client.
I want to have a session of JBOSS.
Something like that = Server.getSession();... Do you understand me?
When the application server is started it creates a session and I would like to retrieve this session.
Are you asking for the process id? If not, then I still do not understand.
What kind of information, or capabilities, are you looking to get from the "JBoss session"? Perhaps if I knew what you were looking for I could help identify what you mean by "session".