Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Subscribe to portal logout event


in my custom UWL connector I must maintain a connection to the backend system. This Connection is stored in the UWLSession object. This works fine.

If the Portal User logs out I must capture this event to close the connection to the backend.

How can i subscribe to this event, or exist an other method to solve this problem. Because of performance issues I can not open and close the session on each backend call. Also the connection must be held for each user and can not be shared.

I am developing on SAP Netweaver Portal 2004s.

Best regards


Former Member

Interesting question! Here are two possible options:

1. Implement a JAAS login module - this contains hooks for login() and logout() methods. It's really meant to be used for authentication, but you can use the same mechanism for login/logout scripts.

2. Implement a connection pool service to manage your connections. This pool can have a scheduled job running every x seconds to clean up connections which have not been used in a few minutes. Your UWL connector would always ask for a connection from this class - if there is none available, one would be created. If there is one available, then use it and update the "last used" time on the connection object in the pool.

Hope this helps,


<a href="">My blog</a>

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question