JBoss Portal SVN: r13902 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity.
by portal-commits@lists.jboss.org
Author: ghjboss
Date: 2010-03-10 22:51:54 -0500 (Wed, 10 Mar 2010)
New Revision: 13902
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UserActivity.java
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
Log:
fix for JBEPP-159
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UserActivity.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UserActivity.java 2010-03-05 16:56:23 UTC (rev 13901)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UserActivity.java 2010-03-11 03:51:54 UTC (rev 13902)
@@ -24,6 +24,8 @@
import javax.management.Notification;
+import org.jboss.portal.core.identity.UsersActivityStatsServiceImpl;
+
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
* @author <a href="mailto:jedim@vige.it">Luca Stancapiano</a>
@@ -70,8 +72,10 @@
{
throw new IllegalArgumentException("Id (notification message) cannot be null");
}
- this.id = notification.getMessage().substring(0, notification.getMessage().indexOf("_"));
- this.sessionId = notification.getMessage().substring(notification.getMessage().indexOf("_"));
+ /************************ JBEPP-159 ****************************************************************************************************************************************************************************************/
+ this.id = notification.getMessage().substring(0, notification.getMessage().indexOf(UsersActivityStatsServiceImpl.USERS_ACTIVITY_STATS_SEPARATOR));
+ this.sessionId = notification.getMessage().substring(notification.getMessage().indexOf(UsersActivityStatsServiceImpl.USERS_ACTIVITY_STATS_SEPARATOR)+UsersActivityStatsServiceImpl.USERS_ACTIVITY_STATS_SEPARATOR.length());
+ /***************************************************************************************************************************************************************************************************************************/
this.timestamp = notification.getTimeStamp();
this.type = Integer.parseInt(notification.getType());
}
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java 2010-03-05 16:56:23 UTC (rev 13901)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/identity/UsersActivityStatsServiceImpl.java 2010-03-11 03:51:54 UTC (rev 13902)
@@ -54,7 +54,9 @@
{
/** Our logger. */
private static final Logger log = Logger.getLogger(UsersActivityStatsServiceImpl.class);
-
+ /***************************** JBEPP-159 ***********************************/
+ public static final String USERS_ACTIVITY_STATS_SEPARATOR = "__SEPARATOR__";
+ /***************************************************************************/
// TODO: some value just to begin - find some good default
private int userTrackerThreadsNumber = 10;
@@ -177,10 +179,11 @@
{
try
{
- Notification notification = new Notification(Integer.toString(userActivity.getType()), this.getServiceName(),
- userActivity.getTimestamp(), userActivity.getTimestamp(), userActivity.getId() + "_"
- + userActivity.getSessionId());
-
+ /****************** JBEPP-159 ***************************************************************************************/
+ Notification notification = new Notification(Integer.toString(userActivity.getType()), this.getServiceName(),
+ userActivity.getTimestamp(), userActivity.getTimestamp(), userActivity.getId() + USERS_ACTIVITY_STATS_SEPARATOR
+ + userActivity.getSessionId());
+ /********************************************************************************************************************/
if (activityBroadcasterName != null)
{
log.debug("Broadcasting user activity notification ");