| Java EE 7 SDK |
This sample application uses the @TransactionScoped annotation on a bean
and injects this bean within a transactional context.
This demo uses a servlet to inject two beans annotated with the @TransactionScoped annotation.
The example is divided in three scenarios:
@TransactionScoped annotation must be invoked
within a transactional context.The servlet at http://<host>:<port>/<context-root>/TransactionScopedServlet runs the three scenarios and
presents the result as HTML output.
Perform the following steps to build, deploy, and run the application:
app_dir is the sample application base directory: samples_install_dir/javaee7/cdi/transaction-scoped.app_dir.run outcome.
mvn clean verify cargo:run
clean 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.