on 01-11-2012 12:56 PM
Hello,
I am experiencing a weird behaviour of an Java WD application embedded in portal.
It's a CATS wrapper - custom app that uses CATS bapis to report time. The application works properly (saves, retrieves data), but the messages are displayed to only one user - the one that accessed it last.
The error messages are from the bapireturn table of the SAVE function, but the success message is issued directly in java if no errors are found. Regardless if it's success or error, the messages are visible to only one user at time.
I don't think it's the app to blame, rather some JCo, message server? I don't really know where to start looking.
Any hints appreciated,
Michal
The cause was the way msgMgr variable was used. The preferred way is with wdComponentAPI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post your code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Which part of the code you require?
Save activities is where I call the RFC. If there are no errors a Save Success should be displayed (for example).
Message manager msgMan is initialized once in doinit.
// Save activities
if (wdThis.saveActivities()) {
loginfo("Save successful");
updateTimesheetData();
msgMan.reportSuccess(msgText.getText(IMessageCOTime_shtComp.SAVE_SUCCESS));
}
I was rather thinking that I should be checking something on the config of Java engine?
Regards,
Michal
Hi,
If there was an exception, especially that I don't catch it, then it would trigger a dump, and the whole application would crash.
It turned out the issue was due to this msgMnr static variable which was initialized in wdDoInit.
When I changed it to the standard way with wdComponentAPI..getMessageManager it works properly.
Thanks for help anyway,
Michal
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.