Ticket #1244 (closed defect: invalid)

Opened 13 months ago

Last modified 9 months ago

Multiple TransactionListeners per application

Reported by: Artur Signell Owned by: Jani Laakso
Priority: undefined Milestone: User Interface Library 5.2.0 RC
Component: Server-side framework Version: 4.1.0-rc
Keywords: Cc:
Known Issue description:
Hours estimate: Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: yes Contract:

Description

There is no method for finding existing TransactionListeners? from an ApplicationContext? (ie. getTransactionListeners()). If each Application instance registers an own listener all listeners will be called when a single HTTP request is made.

For me it is unclear why TransactionListeners? are Context dependent and not Application dependent. By having eg a map that maps Applications <-> TransactionListeners? a listener would only be called for the application it has been registered to. This would make much more sense to me as everything else is related to an Application.

Why would I ever want to know that the user has refreshed another Application on the same server? Using this for inter Application communication sounds dangerous. Could even be a security risk if server is configured to use same session for all applications (current default behaviour?) and different persons are managing different applications on the server.

Change History

Changed 12 months ago by Joonas Lehtinen

  • milestone set to User Interface Library 5.1.0 RC

We should find the status in 5.1.0 and either fix this or list is as future improvement

Changed 10 months ago by Jani Laakso

  • status changed from new to assigned

Changed 10 months ago by Jani Laakso

I agree with your comments, inspecting..

Changed 10 months ago by Jani Laakso

Artur, please note that TransactionListener? code is not thread safe. Suggest you ensure that this issue does not cause any problems with your TK4 application. Typical scenario where e.g. concurrentModificationException could be thrown is on occasion where client requests two Toolkit resources paraller way, let say images, at the same time (Firefox opens two socket connections per host) => there's no code that is run inside synchronized block even though it is required.

Changed 10 months ago by Jani Laakso

  • status changed from assigned to closed
  • resolution set to invalid

Checked from Joonas: API is valid and works correctly. (side-note: it's not thread-safe though).

Changed 10 months ago by Joonas Lehtinen

  • Security is not an issue here as all Application instances within one session are readable by the appilcation anyway
  • getAllTransactionListeners() method would be a nice add-on, but is it really needed?
  • Reason for giving this service on context level is to maintain separation between application and web. The purpose of this is to demote use of this function as the results will vary (a lot) depending on how the adapter evolves. This might be just an academic exercise, but on the other hand there is no pressing reasons for moving this to Application.
  • Use-cases for listening requests to "some other" application might be sparse, but I would guess that I you can find use-case for using transaction listeners in the first place (please do not), then you might find a use-case or using them between multiple applications (controlled by you)

Changed 9 months ago by Joonas Lehtinen

  • milestone changed from User Interface Library 5.1.2 to User Interface Library 5.2.0

Milestone User Interface Library 5.1.2 deleted

Note: See TracTickets for help on using tickets.