Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/JAXWS-RT/Transactional handlers"

< Scout‎ | Concepts‎ | JAXWS-RT
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
Line 1: Line 1:
{{ScoutPage|cat=JAXWS-RT}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
{{ScoutPage|cat=JAXWS-SDK}}
+
Handlers can be annotated to run in a {{ScoutLink|Concepts|ServerJob}}. That means that there is spanned a new transaction before the request is passed to the handler. Thereto, annotate the handler with <code>@ScoutTransaction</code>. Optionally, you can provide the annotation an {{ScoutLink|JAXWS-RT|IServerSessionFactory}} to be used to run the transaction. If not specifying a session factory, the {{ScoutLink|JAXWS-RT|DefaultServerSessionFactory}} is used instead, meaning that simply a new {{ScoutLink|Concepts|ServerSession}} is created at the handler's initialization. When a webservice request is passed to the handler, this session is used in order to create the transaction.
+
 
+
Please note, that when having a webservice providers, the session for their transactional handlers is created prior to the request's authentication. That is why it is created on behalf of the user 'anonymous'. You can change 'anonymous' by specifying the property <code>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal</code> in config.ini with a designated principal to be used to create the session for transactional headers.
+
<pre>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal=xy</pre>
+
Because consumers typically run on behalf of a subject, the previous section with the 'anonymous' prinicpal is not applicable.
+

Latest revision as of 07:22, 18 March 2024

The Scout documentation has been moved to https://eclipsescout.github.io/.

Back to the top