You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Ramaiah, Rajaram A K" <ra...@hp.com> on 2007/07/24 13:20:28 UTC
Restricting Logged in Users across Jetspeed Instances
Hello,
We need to restrict the user sessions for our application to a
configured value. But, we have two jetspeed (2.1) servers configured to
access a common database server. We tried to use the PortalStatistics
object to get the logged in user session but it returns only the local
jetspeed instance-specific logged in users, even though we enabled
'logToDatabase' flag to 'true'.
1) How do we get list of users logged in across jetspeed instances?
2) Can the issue be sovled by moving to Jetspeed clustering? How easy is
it to setup the Jetspeed cluster?
Regards,
Rajaram
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Restricting Logged in Users across Jetspeed Instances
Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Ramaiah,
I think you can use the following method of org.apache.jetspeed.statistics.PortalStatistics:
- public DataSource getDataSource();
I think this method is designed for clustered environments like yours.
And, the USER_STATISTICS table can be queried like the following:
mysql> select * from user_statistics;
+----------------+-----------+---------------------+--------+--------------+
| IPADDRESS | USER_NAME | TIME_STAMP | STATUS | ELAPSED_TIME |
+----------------+-----------+---------------------+--------+--------------+
<Skipped>
| 127.0.0.1 | test1 | 2007-07-27 20:17:34 | 1 | 0 |
| 127.0.0.1 | test1 | 2007-07-27 20:18:11 | 2 | 61859 |
| 127.0.0.1 | guest | 2007-07-27 20:18:11 | 1 | 0 |
+----------------+-----------+---------------------+--------+--------------+
231 rows in set (0.00 sec)
The value for STATUS column can be 1 for log-in-events or 2 for log-out-events.
The ELAPSED_TIME column seems meaningful only when the clustered system supports sticky sessions.
(I think your environment is in this category.)
Regards,
Woonsan
--- "Ramaiah, Rajaram A K" <ra...@hp.com> wrote:
> Hello,
>
> We need to restrict the user sessions for our application to a
> configured value. But, we have two jetspeed (2.1) servers configured to
> access a common database server. We tried to use the PortalStatistics
> object to get the logged in user session but it returns only the local
> jetspeed instance-specific logged in users, even though we enabled
> 'logToDatabase' flag to 'true'.
>
> 1) How do we get list of users logged in across jetspeed instances?
>
> 2) Can the issue be sovled by moving to Jetspeed clustering? How easy is
> it to setup the Jetspeed cluster?
>
> Regards,
> Rajaram
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
____________________________________________________________________________________
Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org