[Version 5.0.2 and later]Understanding application Synch to OS Thread Allowed

Use application Synch to OS Thread Allowed to synchronize a Java thread identity (or JAAS subject) with the OS thread identity for the duration of the current Java 2 Platform, Enterprise Edition (J2EE) application request. If you do not choose this option the OS thread identity value is the same as the servant region identity value. Refer toSynchronizing a Java thread identity and an operating system thread identity for more information.

Application Synch to OS Thread Allowed requires configuration in both the application and the application server:

  1. The WebSphere Application Server developer must configure the application to declare that it wants to execute with application Synch to OS Thread Allowed
  2. The WebSphere Application Server administrator must configure the application server to enable application Synch to OS Thread Allowed

The J2EE application developer configures the application for individual Enterprise JavaBeans (EJB) or Web applications by setting a special env-entry in the deployment descriptor com.ibm.websphere.security.SyncToOSThread = true | false. The default case in which this deployment descriptor is not specified is equivalent to defining it with a value of false.

When an EJB or Web application that requests Synch to OS Thread Allowed is dispatched, the application server (at the request of the EJB Container or the Web Container) synchronizes the OS thread identity associated with the current Java thread identity so the Java thread identity is current on the native thread. This synchronization is effective as long as the EJB or Web application is running the current request. When the EJB or Web completes processing, the native thread is restored to its former state.

If the application requests Synch to OS Thread Allowed but Synch to OS Thread Allowed is not enabled in the application server, when the application attempts to run a no permission exception is issued. If the application does not request Synch to OS Thread Allowed but Synch to OS Thread Allowed is enabled in the application server, no synchronization occurs and the current OS thread identity remains the same as the servant process identity. Note that the Synch to OS Thread Allowed option is ignored unless global security is enabled and the active configured registry is localOS.

Refer to Understanding Java 2 Platform, Enterprise Edition identities and operating system thread identities for more information about the identities discussed above.





Searchable topic ID:   csecunderstandappsync
Last updated: Jun 21, 2007 9:56:50 PM CDT    WebSphere Application Server for z/OS, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/csec_understandappsync.html

Library | Support | Terms of Use | Feedback