cancel
Showing results for 
Search instead for 
Did you mean: 

Messages displayed to only one user

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The cause was the way msgMgr variable was used. The preferred way is with wdComponentAPI.

Stefan-EA
Contributor
0 Kudos

The cause was the way msgMgr variable was used. The preferred way is with wdComponentAPI.

Was the msgMgr declared as static?

former_member182372
Active Contributor
0 Kudos

Post your code

Former Member
0 Kudos

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

former_member182372
Active Contributor
0 Kudos

Are you sure there are no exceptions in


// Save activities
if (wdThis.saveActivities()) {
   loginfo("Save successful");
   updateTimesheetData();

Former Member
0 Kudos

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