l***@knuerr.com
2006-11-13 17:14:00 UTC
Hi,
I have created a MQ Controller Command, which create new user based on a MQ Message.
In order to achieve that I have used UserRegistrationAddCmd.
After that I have to update some information into the self-address.
And here comes my problem - the following finder doesn't work.
address = address.findSelfAddressByMember(mIdLong);
Were the mIdLong is the MemberID of the created customer. Theoritical it schould work although the commit from this transaction will be happened in the end of the command.
Could you say me - where I am wrong?
Thank you very much in advance!
lachezar
uab = new UserAccessBean("G");
uab.commitCopyHelper();
userId = uab.getUserId();
commandContext.changeStore(Integer.valueOf(storeId));
commandContext.setStoreId(Integer.valueOf(storeId));
commandContext.setUserId(Long.valueOf(userId));
requestProperties.put("logonPassword", CICPWD2_CP_Password_2);
requestProperties.put("logonPasswordVerify", CICPWD2_CP_Password_2);
requestProperties.put("logonId",CICNUM_Customer_Number + CICLOG_CP_Logon);
requestProperties.put("firstName", CICFNANE_CP_First_Name);
requestProperties.put("lastName", CICLNME_CP_Last_Name);
requestProperties.put("email1", CICMAIL_CP_Mail);
requestProperties.put("phone1", CICTEL_CP_Tel);
requestProperties.put("storeId", storeId);
requestProperties.put("preferredLanguage", langId);
requestProperties.put("URL", "URL=/webapp/wcs/stores/servlet/");
UserRegistrationAddCmd userRegAddCmd =
(UserRegistrationAddCmd) CommandFactory.createCommand(
UserRegistrationAddCmd.NAME, getStoreId());
userRegAddCmd.setCommandContext(commandContext);
userRegAddCmd.setRequestProperties(requestProperties);
userRegAddCmd.execute();
uab.refreshCopyHelper();
String mId = uab.getMemberId();
Long mIdLong = Long.valueOf(uab.getUserId());
try {
address = address.findSelfAddressByMember(mIdLong);
} catch (Exception e) {
e.printStackTrace();
throw new ECSystemException(
ECMessage._ERR_REMOTE_EXCEPTION,
"extCustomerRegistrationCmdImpl",
"performExecute");
}
address.setFax1(CICFAX_CP_Fax);
address.commitCopyHelper();
I have created a MQ Controller Command, which create new user based on a MQ Message.
In order to achieve that I have used UserRegistrationAddCmd.
After that I have to update some information into the self-address.
And here comes my problem - the following finder doesn't work.
address = address.findSelfAddressByMember(mIdLong);
Were the mIdLong is the MemberID of the created customer. Theoritical it schould work although the commit from this transaction will be happened in the end of the command.
Could you say me - where I am wrong?
Thank you very much in advance!
lachezar
uab = new UserAccessBean("G");
uab.commitCopyHelper();
userId = uab.getUserId();
commandContext.changeStore(Integer.valueOf(storeId));
commandContext.setStoreId(Integer.valueOf(storeId));
commandContext.setUserId(Long.valueOf(userId));
requestProperties.put("logonPassword", CICPWD2_CP_Password_2);
requestProperties.put("logonPasswordVerify", CICPWD2_CP_Password_2);
requestProperties.put("logonId",CICNUM_Customer_Number + CICLOG_CP_Logon);
requestProperties.put("firstName", CICFNANE_CP_First_Name);
requestProperties.put("lastName", CICLNME_CP_Last_Name);
requestProperties.put("email1", CICMAIL_CP_Mail);
requestProperties.put("phone1", CICTEL_CP_Tel);
requestProperties.put("storeId", storeId);
requestProperties.put("preferredLanguage", langId);
requestProperties.put("URL", "URL=/webapp/wcs/stores/servlet/");
UserRegistrationAddCmd userRegAddCmd =
(UserRegistrationAddCmd) CommandFactory.createCommand(
UserRegistrationAddCmd.NAME, getStoreId());
userRegAddCmd.setCommandContext(commandContext);
userRegAddCmd.setRequestProperties(requestProperties);
userRegAddCmd.execute();
uab.refreshCopyHelper();
String mId = uab.getMemberId();
Long mIdLong = Long.valueOf(uab.getUserId());
try {
address = address.findSelfAddressByMember(mIdLong);
} catch (Exception e) {
e.printStackTrace();
throw new ECSystemException(
ECMessage._ERR_REMOTE_EXCEPTION,
"extCustomerRegistrationCmdImpl",
"performExecute");
}
address.setFax1(CICFAX_CP_Fax);
address.commitCopyHelper();