| Java EE 7 SDK | 
This sample demonstrates how to use 
javax.enterprise.concurrent.ManagedThreadFactory to obtain a 
Thread from the Java EE Container.
The sample contains a servlet that uses the newThread() method of the 
   ManagedThreadFactory interface to obtain a Thread 
   from the Java EE Container.
   The servlet in this sample uses the
   default ManagedThreadFactory as defined in the Concurrency Utilities 
   for Java EE 1.0 specification, which is available in all compliant Java EE Products. 
   No special configuration is required.
The following is a list of servlets included in this sample:
| URI pattern | Description | 
|---|---|
| /TestServlet | Obtain a Threadusing thenewThread()method of theManagedThreadFactoryinterface. | 
The application is built and deployed as a WAR file.
newThread() 
	method of ManagedThreadFactory.Perform the following steps to build, deploy, and run the application:
samples_install_dir is the sample application base directory. Go to: samples_install_dir/javaee7/concurrency/executor.
    run outcome.
        mvn clean verify cargo:run
http://localhost:8080/threadsclean outcome to undeploy the sample application and to remove the temporary directories such as
        build and dist.
        mvn clean
If you have problems when running the application, refer to the troubleshooting document.
Copyright © 1997-2013 Oracle and/or its affiliates. All rights reserved.