container/activities/src/main/java/org/mobicents/slee/container/management/jmx/ActivityManagementMBeanImpl.java
@SuppressWarnings("rawtypes")
	private Object[] getDetails(ActivityContextImpl ac) {

		logger.debug("Retrieveing details for acID["
				+ ac.getActivityContextHandle() + "]");
		Object[] o = new Object[ARRAY_SIZE];

		ActivityContextHandle achOrig = ac.getActivityContextHandle();
		//JmxActivityContextHandle ach = ActivityContextHandleSerializer.encode(achOrig);
		String acId = ac.getStringID();
		
		o[ActivityManagementMBeanImplMBean.AC_ID] = acId;
		logger.debug("======[getDetails]["
				+ o[ActivityManagementMBeanImplMBean.AC_ID] + "]["
				+ ac.hashCode() + "]");
		
		
		if (achOrig.getActivityType() == ActivityType.RA) {
			o[RA] = ((ResourceAdaptorActivityContextHandle)achOrig).getResourceAdaptorEntity().getName();
		}
		
		o[ACTIVITY_CLASS] = achOrig.getActivityObject().getClass().getName();
		logger.debug("======[getDetails][ACTIVITY_CLASS][" + o[ACTIVITY_CLASS]
				+ "]");
		// Date d = new Date(ac.getLastAccessTime());
		// o[LAST_ACCESS_TIME] = d;
		o[LAST_ACCESS_TIME] = ac.getLastAccessTime() + "";
		logger.debug("======[getDetails][LAST_ACCESS_TIME]["
				+ o[LAST_ACCESS_TIME] + "]["
				+ new Date(Long.parseLong((String) o[LAST_ACCESS_TIME])) + "]");
		
		Set<SbbEntityID> sbbAttachmentSet = ac.getSbbAttachmentSet();
		String[] tmp = new String[sbbAttachmentSet.size()];
		Iterator<?> it = sbbAttachmentSet.iterator();
		int counter = 0;
		while (it.hasNext()) {
			tmp[counter++] = it.next().toString();
		}
		o[SBB_ATTACHMENTS] = tmp;

		Set<String> nameBindindsSet = ac.getNamingBindings();
		tmp = new String[nameBindindsSet.size()];
		tmp = nameBindindsSet.toArray(tmp);
		o[NAMES_BOUND_TO] = tmp;

		Set<TimerID> attachedTimersSet = ac.getAttachedTimers();
		tmp = new String[attachedTimersSet.size()];
		it = attachedTimersSet.iterator();
		counter = 0;
		while (it.hasNext()) {
			tmp[counter++] = ((TimerID) it.next()).toString();
		}
		o[TIMERS_ATTACHED] = tmp;

		Map m = ac.getDataAttributes();
		tmp = new String[m.size()];
		it = m.keySet().iterator();
		counter = 0;
		while (it.hasNext()) {
			Object k = it.next();
			Object v = m.get(k);
			tmp[counter++] = k + "=" + v;
		}
		o[DATA_PROPERTIES] = tmp;

		return o;
	}
@SuppressWarnings("rawtypes")
	private Object[] getDetails(ActivityContextImpl ac) {

		logger.debug("Retrieveing details for acID["
				+ ac.getActivityContextHandle() + "]");
		Object[] o = new Object[ARRAY_SIZE];

		ActivityContextHandle achOrig = ac.getActivityContextHandle();
		//JmxActivityContextHandle ach = ActivityContextHandleSerializer.encode(achOrig);
		String acId = ac.getStringID();
		
		o[ActivityManagementMBeanImplMBean.AC_ID] = acId;
		logger.debug("======[getDetails]["
				+ o[ActivityManagementMBeanImplMBean.AC_ID] + "]["
				+ ac.hashCode() + "]");
		
		
		if (achOrig.getActivityType() == ActivityType.RA) {
			o[RA] = ((ResourceAdaptorActivityContextHandle)achOrig).getResourceAdaptorEntity().getName();
		}
		
		o[ACTIVITY_CLASS] = achOrig.getActivityObject().getClass().getName();
		logger.debug("======[getDetails][ACTIVITY_CLASS][" + o[ACTIVITY_CLASS]
				+ "]");
		// Date d = new Date(ac.getLastAccessTime());
		// o[LAST_ACCESS_TIME] = d;
		o[LAST_ACCESS_TIME] = ac.getLastAccessTime() + "";
		logger.debug("======[getDetails][LAST_ACCESS_TIME]["
				+ o[LAST_ACCESS_TIME] + "]["
				+ new Date(Long.parseLong((String) o[LAST_ACCESS_TIME])) + "]");
		
		Set<SbbEntityID> sbbAttachmentSet = ac.getSbbAttachmentSet();
		String[] tmp = new String[sbbAttachmentSet.size()];
		Iterator<?> it = sbbAttachmentSet.iterator();
		int counter = 0;
		while (it.hasNext()) {
			tmp[counter++] = it.next().toString();
		}
		o[SBB_ATTACHMENTS] = tmp;

		Set<String> nameBindindsSet = ac.getNamingBindings();
		tmp = new String[nameBindindsSet.size()];
		tmp = nameBindindsSet.toArray(tmp);
		o[NAMES_BOUND_TO] = tmp;

		Set<TimerID> attachedTimersSet = ac.getAttachedTimers();
		tmp = new String[attachedTimersSet.size()];
		it = attachedTimersSet.iterator();
		counter = 0;
		while (it.hasNext()) {
			tmp[counter++] = ((TimerID) it.next()).toString();
		}
		o[TIMERS_ATTACHED] = tmp;

		Map m = ac.getDataAttributes();
		tmp = new String[m.size()];
		it = m.keySet().iterator();
		counter = 0;
		while (it.hasNext()) {
			Object k = it.next();
			Object v = m.get(k);
			tmp[counter++] = k + "=" + v;
		}
		o[DATA_PROPERTIES] = tmp;

		return o;
	}
/*
FIXME uncomment code when everything is commited

This method should be run in tx