1 Reply Latest reply on Aug 15, 2012 1:18 AM by userBDBDMS-Oracle

    Adding users with the Java API

    Marius H
      We get the "Migration path not supported" when we try to upgrade our to, probably because we use a Oracle 11G DB.

      A clean install works fine (eventually, see other post from me today), but then I need to reapply all the users, since we remove the SYNCSERVER tablespace.

      In the web console, adding 360 users would take hours of boring, repetetive work. Therefore I have made a small java class that basically does the following for each user ID:

      rm.createUser(userID, "mysecretpassword", "DFU " + userID, "U");
      cm.createSubscription(PUBLICATION_NAME, userID);
      cm.setSubscriptionParameter(PUBLICATION_NAME, userID, subsettingParamName, userID); //we use the userID value as subsetting value
      cm.instantiateSubscription(PUBLICATION_NAME, userID);

      This code runs fine, but I am not sure that I understand what happens "under the hood".

      When I add users in Mobile Manager web, I am not able to define data subsetting unless i also have attached an application to the user. I am not able to find methods for register/connection the user with an application in the API. How can I do this? The application is allready registered on the server, I just need to to link user->application like in the web console.

      Also: is subscription the same as subsetting? Am I defining subsetting parameter for a user by doing this? :
      cm.createSubscription(PUBLICATION_NAME, userID);
      cm.setSubscriptionParameter(PUBLICATION_NAME, userID, _subsetParam, userID);
      cm.instantiateSubscription(PUBLICATION_NAME, userID);

      Notice that there are nothing referring to the application...