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 David Sean Taylor <da...@bluesunrise.com> on 2007/07/02 18:28:20 UTC

Re: Rendering Folders

On Jun 28, 2007, at 11:45 PM, Ramaiah, Rajaram A K wrote:

> Hello,
>
> I'd like to add to Ravi Kumar's question in an earlier posting:
>
> Basically, our requirement is to provide a combo-box in our portal
> application which will enable the admin user to switch to a different
> user view which has different set of tabs/panes/psmls. Please note  
> that
> the actual role of the admin user should not be changed. Now, our  
> issue
> is how to render a 'folder' with multiple psml files. Though some
> suggest to use '$jetspeed.renderFolder()' in velocity code, there  
> is not
> enough details of the function provided. If there are also other
> approaches, please let us know.
>

To build the combo box of user folders, you can use the PageManager  
service:

Folder subsiteFolder = pageManager.getFolder("/_user");
NodeSet set = pageManager.getFolders(subsiteFolder);
if (set != null && !set.isEmpty())
{
     Iterator setIterator = set.iterator();
     while (setIterator.hasNext())
     {
         Folder f = (Folder)setIterator.next();
		 ...
     }
}

As for the Admin user to view any folder, there is an open issue on that

https://issues.apache.org/jira/browse/JS2-675

that I can hopefully resolve soon



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


Restricting Logged in Users across Jetspeed Instances

Posted by "Ramaiah, Rajaram A K" <ra...@hp.com>.
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: Selective Session Timout Functionality

Posted by "Ramaiah, Rajaram A K" <ra...@hp.com>.
Hi David,

Thanks for your reply.

Sure, I'll raise this question at the Tomcat list. Regarding another
feature (hard timeout), I'm already planning to use it as a workaround
as it solves the problem of indefinitely live session due to the refresh
activity. It's possible that a user logs in and clicks on the page which
refreshes perdiocally and forgets to logout. In this case, hard timeout
should help to some extent.

Regards,
Rajaram 

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Thursday, August 16, 2007 7:19 AM
To: Jetspeed Users List
Subject: Re: Selective Session Timout Functionality
Importance: High


On Aug 13, 2007, at 3:55 AM, Ramaiah, Rajaram A K wrote:

> Hello,
>
> Our Jetspeed 2.1.2 based portal application requires the following
> functionality:
>
> We have a page (URL) that gets refreshed periodically based on a timer

> set in the javascript. Now, we don't want this activity (GET URL) to 
> be considered as a session activity which means that the session 
> timeout value should NOT be reset. The user should be logged out if 
> he/she does not perform any operation on the portal application for 
> more than the configured session timeout value, even though the page 
> gets refreshed periodically.
>
> Appreciate any help to implement this functionality.
>
Jetspeed's session timeout is based on the servlet container's session
timeout configuration Every time you make a request to the context, the
session inactivity timer is reset by the servlet container, not Jetspeed
I don't know of anyway to tell the servlet container to differentiate
between a javascript request and user interaction, but this does seem
like a very useful case Perhaps its a question you can ask on the Tomcat
list There is another feature in Jetspeed that will logout a user after
a configured number of seconds, regardless of their activity, but this
is not exactly what you require either




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Selective Session Timout Functionality

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Aug 13, 2007, at 3:55 AM, Ramaiah, Rajaram A K wrote:

> Hello,
>
> Our Jetspeed 2.1.2 based portal application requires the following
> functionality:
>
> We have a page (URL) that gets refreshed periodically based on a timer
> set in the javascript. Now, we don't want this activity (GET URL)  
> to be
> considered as a session activity which means that the session timeout
> value should NOT be reset. The user should be logged out if he/she  
> does
> not perform any operation on the portal application for more than the
> configured session timeout value, even though the page gets refreshed
> periodically.
>
> Appreciate any help to implement this functionality.
>
Jetspeed's session timeout is based on the servlet container's  
session timeout configuration
Every time you make a request to the context, the session inactivity  
timer is reset by the servlet container, not Jetspeed
I don't know of anyway to tell the servlet container to differentiate  
between a javascript request and user interaction, but this does seem  
like a very useful case
Perhaps its a question you can ask on the Tomcat list
There is another feature in Jetspeed that will logout a user after a  
configured number of seconds, regardless of their activity, but this  
is not exactly what you require either




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Selective Session Timout Functionality

Posted by "Ramaiah, Rajaram A K" <ra...@hp.com>.
Hello,

Our Jetspeed 2.1.2 based portal application requires the following
functionality:

We have a page (URL) that gets refreshed periodically based on a timer
set in the javascript. Now, we don't want this activity (GET URL) to be
considered as a session activity which means that the session timeout
value should NOT be reset. The user should be logged out if he/she does
not perform any operation on the portal application for more than the
configured session timeout value, even though the page gets refreshed
periodically.

Appreciate any help to implement this functionality.

Regards,
Rajaram

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Rendering Folders

Posted by "Ramaiah, Rajaram A K" <ra...@hp.com>.
Thanks David. 

We are able to achieve the same by just rendering a psml file in a
folder. Jetspeed renders the 'tab' for all the psmls in the folder and
also the content of the requested psml i.e. the requested psml has been
made as the active page. Please let me know if this is the expected
behaviour of jetspeed. I hope this behaviour will not be treated as a
bug :-)

We have created a 'non-profiled' folder (duplicate of the _role folder)
to switch to a role-specific view as an admin user. This is only a
workaround. But, hope to get the fix as you mentioned.

Regards,
Rajaram

-----Original Message-----
From: David Sean Taylor [mailto:david@bluesunrise.com] 
Sent: Monday, July 02, 2007 9:58 PM
To: Jetspeed Users List
Subject: Re: Rendering Folders


On Jun 28, 2007, at 11:45 PM, Ramaiah, Rajaram A K wrote:

> Hello,
>
> I'd like to add to Ravi Kumar's question in an earlier posting:
>
> Basically, our requirement is to provide a combo-box in our portal 
> application which will enable the admin user to switch to a different 
> user view which has different set of tabs/panes/psmls. Please note 
> that the actual role of the admin user should not be changed. Now, our

> issue is how to render a 'folder' with multiple psml files. Though 
> some suggest to use '$jetspeed.renderFolder()' in velocity code, there

> is not enough details of the function provided. If there are also 
> other approaches, please let us know.
>

To build the combo box of user folders, you can use the PageManager
service:

Folder subsiteFolder = pageManager.getFolder("/_user"); NodeSet set =
pageManager.getFolders(subsiteFolder);
if (set != null && !set.isEmpty())
{
     Iterator setIterator = set.iterator();
     while (setIterator.hasNext())
     {
         Folder f = (Folder)setIterator.next();
		 ...
     }
}

As for the Admin user to view any folder, there is an open issue on that

https://issues.apache.org/jira/browse/JS2-675

that I can hopefully resolve soon



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org