This discussion is archived
1 Reply Latest reply: Aug 14, 2012 6:18 PM by userBDBDMS RSS

Adding users with the Java API

671304 Newbie
Currently Being Moderated
We get the "Migration path not supported" when we try to upgrade our 10.3.0.2 to 10.3.0.3, 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.dropUser(userID);
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...


Thanks,

Marius

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points