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 lui bau <oc...@yahoo.com> on 2006/05/10 23:44:11 UTC
how to get portal statistic infomation
How do I get portal statistics information from my portlet? I've been looking for this the past few days and didn't get much infomation about it..
Thanks in advance.
sue
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
Re: how to get portal statistic infomation
Posted by lui bau <oc...@yahoo.com>.
I finally get the portal service instance from my portlet working. Thanks Jacek's help!
My another question is about PortalStatistics API, what is the different between getNumberOfCurrentUsers() and getNumberOfLoggedInUsers(), no matter how I test my portlet, I always get the same result. In what situation should I get different result for this two API??
Thanks in advance for the help..
luibau
Jacek Wi¶licki <ja...@gmail.com> wrote: Wiadomosc od lui bau z 2006-05-12 22:50 brzmiala:
> Ah, thanks for the hints, I have the 2.0-FINAL.. Guess I have to upgrade to the latest verion.. :(
Only if you really need it (there are some major changes and bugfixes).
If not, just modify portlet.xml before deployment. This action is
required only if you edit jetspeed-portlet.xml, which is rather rare.
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------
Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better.
Re: how to get portal statistic infomation
Posted by Jacek Wiślicki <ja...@gmail.com>.
Wiadomosc od lui bau z 2006-05-12 22:50 brzmiala:
> Ah, thanks for the hints, I have the 2.0-FINAL.. Guess I have to upgrade to the latest verion.. :(
Only if you really need it (there are some major changes and bugfixes).
If not, just modify portlet.xml before deployment. This action is
required only if you edit jetspeed-portlet.xml, which is rather rare.
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: how to get portal statistic infomation
Posted by lui bau <oc...@yahoo.com>.
Ah, thanks for the hints, I have the 2.0-FINAL.. Guess I have to upgrade to the latest verion.. :(
thanks!
lui
Jacek Wi¶licki <ja...@gmail.com> wrote: Wiadomosc od lui bau z 2006-05-12 20:54 brzmiala:
>
> I can be able to get the UserManger instance, but not the PortalStatistics, why???
I don't know what version of Jetspeed you are using. There used to a bug
(described at https://issues.apache.org/jira/browse/JS2-464). If your
build is rather old, you must change also portlet.xml to force changes
in jetspeed-portlet.xml visible. Or create a row manually in
JETSPEED_SERVICES table.
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Re: how to get portal statistic infomation
Posted by Jacek Wiślicki <ja...@gmail.com>.
Wiadomosc od lui bau z 2006-05-12 20:54 brzmiala:
> <snip />
> I can be able to get the UserManger instance, but not the PortalStatistics, why???
I don't know what version of Jetspeed you are using. There used to a bug
(described at https://issues.apache.org/jira/browse/JS2-464). If your
build is rather old, you must change also portlet.xml to force changes
in jetspeed-portlet.xml visible. Or create a row manually in
JETSPEED_SERVICES table.
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: how to get portal statistic infomation
Posted by lui bau <oc...@yahoo.com>.
I tried this, but I got null pointer exception for the statistic services. However I can get another service (UserManager) from my portlet.
Here's my jetspeed-portlet.xml
<js:services>
<js:service name='UserManager'/>
<js:service name='RoleManager'/>
<js:service name='GroupManager'/>
<js:service name="Profiler" />
<js:service name="SSO" />
<js:service name='PortletRegistryComponent'/>
<js:service name='PageManager'/>
<js:service name='PortalStatistics'/>
</js:services>
</portlet-app>
and here's my portlet code trying to get the PortalStatistics services.
PortletContext context = getPortletContext();
PortalStatistics statistics = (PortalStatistics)context.getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
UserManager userManager = (UserManager) context.getAttribute(CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
I can be able to get the UserManger instance, but not the PortalStatistics, why???
lui
Jacek Wi¶licki <ja...@gmail.com> wrote: Wiadomosc od Jacek Wi¶licki z 2006-05-11 00:05 brzmiala:
> I'm not sure, but try to enable to your webapp a PortalStatistics
> component (a service in jetspeed-portlet.xml), get it with
> (PortalStatisticsgetPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
> amd see how much you can get from it :)
(PortalStatistics)getPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
Re: how to get portal statistic infomation
Posted by lui bau <oc...@yahoo.com>.
Thanks for millions...
Jacek Wi¶licki <ja...@gmail.com> wrote: Wiadomosc od Jacek Wi¶licki z 2006-05-11 00:05 brzmiala:
> I'm not sure, but try to enable to your webapp a PortalStatistics
> component (a service in jetspeed-portlet.xml), get it with
> (PortalStatisticsgetPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
> amd see how much you can get from it :)
(PortalStatistics)getPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
Re: how to get portal statistic infomation
Posted by Jacek Wiślicki <ja...@gmail.com>.
Wiadomosc od Jacek Wiślicki z 2006-05-11 00:05 brzmiala:
> I'm not sure, but try to enable to your webapp a PortalStatistics
> component (a service in jetspeed-portlet.xml), get it with
> (PortalStatisticsgetPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
> amd see how much you can get from it :)
(PortalStatistics)getPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: how to get portal statistic infomation
Posted by Jacek Wiślicki <ja...@gmail.com>.
Wiadomosc od lui bau z 2006-05-10 23:44 brzmiala:
> How do I get portal statistics information from my portlet? I've been looking for this the past few days and didn't get much infomation about it..
I'm not sure, but try to enable to your webapp a PortalStatistics
component (a service in jetspeed-portlet.xml), get it with
(PortalStatisticsgetPortletContext().getAttribute(CommonPortletServices.CPS_PORTAL_STATISTICS);
amd see how much you can get from it :)
--
pozdrawiam,
Jacek Wislicki
jacek.wislicki@gmail.com
tel.: +48 502 408 444
gg: 2540358
skype: jacek_wislicki
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org