cancel
Showing results for 
Search instead for 
Did you mean: 

Subscribe to portal logout event

Former Member
0 Kudos

Hi,

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

Matthias

Accepted Solutions (1)

Accepted Solutions (1)

darren_hague
Contributor
0 Kudos

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,

Darren

<a href="http://www.fortybeans.com/">My blog</a>

Former Member
0 Kudos

Thank you Darran for this suggestion, I think this is the right way so I have developed a PoolingService which works fine and implemented an LoginModule which still doesn't work - <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=598809">my thread to this problem</a> - but the subcribtion to the event is no problem anymore, so I think this Thread can be marked as answered and you earned 10 Points.

Best regards

Matthias

Answers (0)