private void createServiceSession(
     ServiceAccess serviceAccess, String subKey, String sessionId, String userToken)
     throws ObjectNotFoundException, ServiceParameterException, OperationNotPermittedException,
         ValidationException {
   SessionService service = serviceAccess.getService(SessionService.class);
   long subscriptionKey = ADMStringUtils.parseUnsignedLong(subKey);
   service.createServiceSession(subscriptionKey, sessionId, userToken);
 }
  /** Retrieve the marketplace for the given subscription in order to login */
  private VOMarketplace determineMarketplaceForSubscription(
      HttpServletRequest httpRequest, AuthorizationRequestData rdo) throws ObjectNotFoundException {
    Map<String, VOMarketplace> cachedMarketplaces =
        getMarketplaceMapFromSession(httpRequest.getSession());
    VOMarketplace mpl = cachedMarketplaces.get(rdo.getSubscriptionKey());
    if (mpl == null) {
      MarketplaceService marketplaceService =
          ServiceAccess.getServiceAcccessFor(httpRequest.getSession())
              .getService(MarketplaceService.class);
      mpl =
          marketplaceService.getMarketplaceForSubscription(
              ADMStringUtils.parseUnsignedLong(rdo.getSubscriptionKey()), "en");

      // Bug 9588: Marketplace may have been deleted
      if (mpl != null) {
        cachedMarketplaces.put(rdo.getSubscriptionKey(), mpl);
      }
    }
    return mpl;
  }