With STC pooling, the Endevor STC is spawned before the first action request arrives, so there is no way to figure out the user-id which will come in the future.
But the Endevor world has to be initialized under some user-id, so this user-id is taken from endevor.cfg file under Tomcat or if not specified, as Tomcat's user-id.
Later, when an action request arrives (together with real user-id), the user-id is swapped temporarily for the time the request is fulfilled.
This can result in the error:
C1I0012E YOU ARE NOT AUTHORIZED TO ACCESS ANY ENDEVOR ENVIRONMENTS
To resolve the problem you can either supply the Tomcat id with authority to any Endevor environment, or provide an id through the userID parameter in the datasource config file (endevor.cfg)