Skip to main content

Notice: This Wiki is now read only and edits are no longer 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
Line 1: Line 1:
 
{{ScoutPage|cat=JAXWS-RT}}
 
{{ScoutPage|cat=JAXWS-RT}}
 
{{ScoutPage|cat=JAXWS-SDK}}
 
{{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 a {{ScoutLink|Concepts|JAXWS-RT|IServerSessionFactory}} to be used to run the transaction. If not specifying a session factory, the {{ScoutLink|Concepts/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.
+
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 a {{ScoutLink|Concepts/JAXWS-RT|IServerSessionFactory}} to be used to run the transaction. If not specifying a session factory, the {{ScoutLink|Concepts/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 provider, the session for 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 this by specifying the property <code>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal</code> in config.ini with a designated principal name.
 
Please note, that when having a webservice provider, the session for 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 this by specifying the property <code>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal</code> in config.ini with a designated principal name.
  
 
<pre>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal=xy</pre>
 
<pre>org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal=xy</pre>

Revision as of 17:31, 10 November 2011

The Scout documentation has been moved to https://eclipsescout.github.io/. The Scout documentation has been moved to https://eclipsescout.github.io/. Handlers can be annotated to run in a The Scout documentation has been moved to https://eclipsescout.github.io/.. That means that there is spanned a new transaction before the request is passed to the handler. Thereto, annotate the handler with @ScoutTransaction. Optionally, you can provide the annotation a The Scout documentation has been moved to https://eclipsescout.github.io/. to be used to run the transaction. If not specifying a session factory, the The Scout documentation has been moved to https://eclipsescout.github.io/. is used instead, meaning that simply a new The Scout documentation has been moved to https://eclipsescout.github.io/. 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 provider, the session for 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 this by specifying the property org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal in config.ini with a designated principal name.

org.eclipse.scout.jaxws216.txhandler.sessionfactory.principal=xy

Back to the top