Ejemplo n.º 1
0
  @Override
  public void addMessageToRoom(String room, String msg) throws OKMException {
    updateSessionManager();
    String user = getThreadLocalRequest().getRemoteUser();

    try {
      if (user != null) {
        manager.addMessageToRoom(user, room, msg);
      }
    } catch (PrincipalAdapterException e) {
      log.error(e.getMessage(), e);
      throw new OKMException(
          ErrorCode.get(ErrorCode.ORIGIN_OKMChatService, ErrorCode.CAUSE_PrincipalAdapter),
          e.getMessage());
    }
  }