├── .gitignore ├── .travis.yml ├── Dockerfile ├── LICENSE ├── README.md ├── batch ├── README.md ├── batch-listeners │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── batch │ │ │ │ └── listeners │ │ │ │ ├── BatchListenerRecorder.java │ │ │ │ ├── MyChunkListener.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemProcessorListener.java │ │ │ │ ├── MyItemReadListener.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriteListener.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ ├── MyJobListener.java │ │ │ │ ├── MyOutputRecord.java │ │ │ │ └── MyStepListener.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── batch │ │ └── listeners │ │ └── BatchListenersTest.java ├── batchlet-simple │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── batchlet │ │ │ │ └── simple │ │ │ │ └── MyBatchlet.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── batchlet │ │ └── simple │ │ └── MyBatchletTest.java ├── chunk-checkpoint │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── chunk │ │ │ │ └── checkpoint │ │ │ │ ├── MyCheckpointAlgorithm.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── chunk │ │ └── checkpoint │ │ └── BatchChunkCheckpointTest.java ├── chunk-csv-database │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── chunk │ │ │ │ └── csv │ │ │ │ └── database │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── Person.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ ├── batch-jobs │ │ │ │ └── myJob.xml │ │ │ │ ├── create.sql │ │ │ │ ├── drop.sql │ │ │ │ ├── mydata.csv │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── chunk │ │ └── csv │ │ └── database │ │ └── BatchCSVDatabaseTest.java ├── chunk-exception │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── chunk │ │ │ │ └── exception │ │ │ │ ├── ChunkExceptionRecorder.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ ├── MyOutputRecord.java │ │ │ │ ├── MyRetryProcessorListener.java │ │ │ │ ├── MyRetryReadListener.java │ │ │ │ ├── MyRetryWriteListener.java │ │ │ │ ├── MySkipProcessorListener.java │ │ │ │ ├── MySkipReadListener.java │ │ │ │ └── MySkipWriteListener.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── chunk │ │ └── exception │ │ └── BatchChunkExceptionTest.java ├── chunk-mapper │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── sample │ │ │ │ └── chunk │ │ │ │ └── mapper │ │ │ │ ├── MyAnalyzer.java │ │ │ │ ├── MyCollector.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ ├── MyMapper.java │ │ │ │ ├── MyOutputRecord.java │ │ │ │ └── MyReducer.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── sample │ │ └── chunk │ │ └── mapper │ │ └── BatchChunkMapperTest.java ├── chunk-optional-processor │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── chunk │ │ │ │ └── optional │ │ │ │ └── processor │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── chunk │ │ └── optional │ │ └── processor │ │ └── BatchChunkOptionalProcessorTest.java ├── chunk-partition │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── sample │ │ │ │ └── chunk │ │ │ │ └── partition │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── sample │ │ └── chunk │ │ └── partition │ │ └── BatchChunkPartitionTest.java ├── chunk-simple-nobeans │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── samples │ │ │ │ └── chunk │ │ │ │ └── simple │ │ │ │ └── nobeans │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── batch-jobs │ │ │ └── myJob.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── samples │ │ └── chunk │ │ └── simple │ │ └── nobeans │ │ └── BatchChunkSimpleNoBeansTest.java ├── chunk-simple │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── chunk │ │ │ │ └── simple │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── chunk │ │ └── simple │ │ └── ChunkSimpleTest.java ├── decision │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── decision │ │ │ │ ├── MyBatchlet1.java │ │ │ │ ├── MyBatchlet2.java │ │ │ │ ├── MyBatchlet3.java │ │ │ │ └── MyDecider.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── decision │ │ └── BatchDecisionTest.java ├── flow │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── flow │ │ │ │ ├── MyBatchlet1.java │ │ │ │ ├── MyBatchlet2.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── flow │ │ └── BatchFlowTest.java ├── multiple-steps │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── multiple │ │ │ │ └── steps │ │ │ │ ├── MyBatchlet.java │ │ │ │ ├── MyInputRecord.java │ │ │ │ ├── MyItemProcessor.java │ │ │ │ ├── MyItemReader.java │ │ │ │ ├── MyItemWriter.java │ │ │ │ └── MyOutputRecord.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── myJob.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── multiple │ │ └── steps │ │ └── BatchMultipleStepsTest.java ├── pom.xml ├── scheduling │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── batch │ │ │ │ └── samples │ │ │ │ └── scheduling │ │ │ │ ├── AbstractTimerBatch.java │ │ │ │ ├── MyBatchlet.java │ │ │ │ ├── MyJob.java │ │ │ │ ├── MyManagedScheduledBatch.java │ │ │ │ ├── MyManagedScheduledBatchBean.java │ │ │ │ └── MyTimerScheduleBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── batch-jobs │ │ │ └── myJob.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── batch │ │ └── samples │ │ └── scheduling │ │ ├── ManagedScheduledBatchTest.java │ │ ├── MyJobAlternative.java │ │ ├── MyManagedScheduledBatchAlternative.java │ │ ├── MyStepListener.java │ │ ├── MyTimerScheduleAlternative.java │ │ └── TimerScheduleBatchTest.java └── split │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── batch │ │ │ └── split │ │ │ ├── MyBatchlet1.java │ │ │ ├── MyBatchlet2.java │ │ │ └── MyBatchlet3.java │ ├── resources │ │ └── META-INF │ │ │ └── batch-jobs │ │ │ └── myJob.xml │ └── webapp │ │ └── WEB-INF │ │ └── beans.xml │ └── test │ └── java │ └── org │ └── javaee7 │ └── batch │ └── split │ └── BatchSplitTest.java ├── cdi ├── README.md ├── alternatives-priority │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── alternatives │ │ │ └── priority │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ ├── PriorityGreeting.java │ │ │ ├── ProducerMethodGreeting.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── alternatives │ │ │ └── priority │ │ │ ├── GreetingTest.java │ │ │ ├── MixedGreetingTest.java │ │ │ └── ProducerMethodGreetingTest.java │ │ └── resources │ │ ├── beans-alternatives.xml │ │ └── beans-empty.xml ├── alternatives │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── alternatives │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── alternatives │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── bean-discovery-all │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ ├── Greeting.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── nobeans │ │ │ └── xml │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── bean-discovery-annotated │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ └── annotated │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ └── annotated │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── bean-discovery-none │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ └── none │ │ │ ├── FancyGreeting.java │ │ │ └── Greeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ └── none │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── beanmanager │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── beanmanager │ │ │ ├── Greeting.java │ │ │ ├── SimpleGreeting.java │ │ │ └── SmileyGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── beanmanager │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── beansxml-noversion │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── beansxml │ │ │ └── noversion │ │ │ ├── AnnotatedBean.java │ │ │ └── NotAnnotatedBean.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── beansxml │ │ │ └── noversion │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── built-in │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── built │ │ │ └── in │ │ │ ├── Greeting.java │ │ │ ├── SimpleGreeting.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp ├── decorators-builtin-beans │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── decorators │ │ │ │ └── builtin │ │ │ │ └── RequestDecorator.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── decorators │ │ └── builtin │ │ └── DecoratorTest.java ├── decorators-priority │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── decorators │ │ │ │ └── priority │ │ │ │ ├── Greeting.java │ │ │ │ ├── MyDecorator.java │ │ │ │ └── SimpleGreeting.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── decorators │ │ └── priority │ │ └── DecoratorTest.java ├── decorators │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── decorators │ │ │ │ ├── Greeting.java │ │ │ │ ├── MyDecorator.java │ │ │ │ └── SimpleGreeting.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── decorators │ │ └── DecoratorTest.java ├── dynamic-interceptor │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── dynamic │ │ │ │ └── interceptor │ │ │ │ ├── MyBean.java │ │ │ │ └── extension │ │ │ │ ├── CdiExtension.java │ │ │ │ ├── DynamicHelloInterceptor.java │ │ │ │ ├── DynamicInterceptorBase.java │ │ │ │ ├── Hello.java │ │ │ │ └── HelloInterceptorEnabler.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── javax.enterprise.inject.spi.Extension │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── dynamic │ │ │ └── interceptor │ │ │ └── DynamicInterceptorTest.java │ │ └── resources │ │ └── beans.xml ├── events-conditional-reception │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── events │ │ │ └── conditional │ │ │ ├── EventReceiver.java │ │ │ ├── EventSender.java │ │ │ ├── GreetingReceiver.java │ │ │ └── GreetingSender.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── events │ │ │ └── conditional │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── events │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── events │ │ │ ├── EventReceiver.java │ │ │ ├── EventSender.java │ │ │ ├── GreetingReceiver.java │ │ │ └── GreetingSender.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── events │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── exclude-filter │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── exclude │ │ │ └── filter │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ ├── TestServlet.java │ │ │ └── beans │ │ │ └── SimpleGreeting.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp ├── extension-impl │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── extension │ │ │ └── impl │ │ │ └── MyExtension.java │ │ ├── resources │ │ └── META-INF │ │ │ └── services │ │ │ └── javax.enterprise.inject.spi.Extension │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp ├── extension │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── discovery │ │ │ ├── Greeting.java │ │ │ ├── SimpleGreeting.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── lib │ │ │ └── extension-impl-1.0-SNAPSHOT.jar │ │ └── index.jsp ├── instance-qualifiers │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── instance │ │ │ ├── Business.java │ │ │ ├── FormalGreeting.java │ │ │ ├── Greeting.java │ │ │ ├── Personal.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── instance │ │ │ ├── AnyGreetingTest.java │ │ │ ├── GreetingTest.java │ │ │ └── PersonalGreetingTest.java │ │ └── resources │ │ └── beans.xml ├── instance │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── instance │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── instance │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── interceptors-priority │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── interceptors │ │ │ └── priority │ │ │ ├── Greeting.java │ │ │ ├── HighPriorityInterceptor.java │ │ │ ├── LowPriorityInterceptor.java │ │ │ ├── MyInterceptorBinding.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── interceptors │ │ │ └── priority │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── interceptors │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── interceptors │ │ │ ├── Greeting.java │ │ │ ├── MyInterceptor.java │ │ │ ├── MyInterceptorBinding.java │ │ │ └── SimpleGreeting.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── interceptors │ │ │ └── GreetingTest.java │ │ └── resources │ │ └── beans.xml ├── nobeans-el-injection-flowscoped │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── nobeans │ │ │ │ └── el │ │ │ │ └── injection │ │ │ │ └── flowscoped │ │ │ │ └── FlowScopedBean.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── myflow │ │ │ ├── index.xhtml │ │ │ └── myflow-flow.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── nobeans │ │ └── el │ │ └── injection │ │ └── flowscoped │ │ └── FlowScopedBeanTest.java ├── nobeans-el-injection │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── cdi │ │ │ │ └── nobeans │ │ │ │ └── el │ │ │ │ └── injection │ │ │ │ └── ScopedBean.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── index.xhtml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── nobeans │ │ └── el │ │ └── injection │ │ └── ScopedBeanTest.java ├── nobeans-xml │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── nobeans │ │ │ └── xml │ │ │ └── ScopedBean.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── nobeans │ │ └── xml │ │ └── ScopedBeanTest.java ├── pkg-level │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── pkg │ │ │ └── level │ │ │ ├── FancyGreeting.java │ │ │ ├── Greeting.java │ │ │ ├── TestServlet.java │ │ │ └── beans │ │ │ ├── SimpleGreeting.java │ │ │ └── package-info.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp ├── pom.xml ├── scopes │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── cdi │ │ │ └── bean │ │ │ └── scopes │ │ │ ├── ClientServlet.java │ │ │ ├── MyApplicationScopedBean.java │ │ │ ├── MyRequestScopedBean.java │ │ │ ├── MySessionScopedBean.java │ │ │ ├── MySingletonScopedBean.java │ │ │ └── ServerServlet.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp └── vetoed │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── vetoed │ │ ├── FancyGreeting.java │ │ ├── Greeting.java │ │ └── SimpleGreeting.java │ └── test │ ├── java │ └── org │ │ └── javaee7 │ │ └── cdi │ │ └── vetoed │ │ └── GreetingTest.java │ └── resources │ └── beans.xml ├── concurrency ├── README.md ├── dynamicproxy │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── concurrency │ │ │ └── dynamicproxy │ │ │ ├── MyRunnable.java │ │ │ ├── MyRunnableWork.java │ │ │ ├── MyWork.java │ │ │ ├── TestMultipleInterfaceServlet.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── managedexecutor │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── concurrency │ │ │ │ └── managedexecutor │ │ │ │ ├── MyCallableTask.java │ │ │ │ ├── MyRunnableTask.java │ │ │ │ ├── MyTaskWithListener.java │ │ │ │ ├── MyTaskWithTransaction.java │ │ │ │ ├── MyTransactionScopedBean.java │ │ │ │ ├── MyWaitingTask.java │ │ │ │ ├── Product.java │ │ │ │ ├── TestBean.java │ │ │ │ └── TestStatus.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── concurrency │ │ └── managedexecutor │ │ ├── ExecutorInjectTest.java │ │ └── ExecutorJNDITest.java ├── managedscheduledexecutor │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── concurrency │ │ │ └── managedscheduledexecutor │ │ │ ├── MyCallableTask.java │ │ │ ├── MyRunnableTask.java │ │ │ ├── MyTrigger.java │ │ │ ├── Product.java │ │ │ ├── ScheduleFixedRateServlet.java │ │ │ ├── ScheduleServlet.java │ │ │ ├── ScheduleWithFixedDelayServlet.java │ │ │ └── TestTriggerServlet.java │ │ └── webapp │ │ └── index.jsp ├── managedthreadfactory │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── concurrency │ │ │ │ └── managedthreadfactory │ │ │ │ ├── MyTask.java │ │ │ │ ├── TestJNDIServlet.java │ │ │ │ ├── TestResourceNoNameServlet.java │ │ │ │ └── TestResourceServlet.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── concurrency │ │ └── managedthreadfactory │ │ └── MyTaskTest.java └── pom.xml ├── ejb ├── README.md ├── async-ejb │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── async │ │ │ ├── MyAsyncBeanClassLevel.java │ │ │ └── MyAsyncBeanMethodLevel.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── ejb │ │ └── async │ │ ├── AsyncClassBeanTest.java │ │ └── AsyncMethodBeanTest.java ├── embeddable │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── ejb │ │ │ │ └── embeddable │ │ │ │ └── MyBean.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── ejb │ │ └── embeddable │ │ └── MyBeanTest.java ├── lifecycle │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── lifecycle │ │ │ ├── MyAroundConstructInterceptor.java │ │ │ ├── MyAroundConstructInterceptorBinding.java │ │ │ ├── MyStatefulBean.java │ │ │ ├── MyStatelessBean.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans2.xml │ │ └── index.jsp ├── pom.xml ├── remote │ ├── pom.xml │ ├── roles-allowed-ssl │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── javaee7 │ │ │ │ │ └── ejb │ │ │ │ │ └── remote │ │ │ │ │ └── ssl │ │ │ │ │ ├── Bean.java │ │ │ │ │ └── BeanRemote.java │ │ │ └── resources │ │ │ │ └── META-INF │ │ │ │ ├── application.xml │ │ │ │ └── glassfish-ejb-jar.xml │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── ejb │ │ │ │ └── remote │ │ │ │ └── ssl │ │ │ │ └── RemoteBeanTest.java │ │ │ └── resources │ │ │ ├── addUsersPayara.txt │ │ │ └── password.txt │ ├── roles-allowed │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── java │ │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── ejb │ │ │ │ └── remote │ │ │ │ └── remote │ │ │ │ ├── Bean.java │ │ │ │ └── BeanRemote.java │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── ejb │ │ │ │ └── remote │ │ │ │ └── RemoteBeanTest.java │ │ │ └── resources │ │ │ ├── addUsersPayara.txt │ │ │ └── password.txt │ └── vendor │ │ ├── README.md │ │ ├── payara-glassfish │ │ ├── README.md │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── PayaraEJBContextProvider.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── org.javaee7.RemoteEJBContextProvider │ │ └── pom.xml ├── singleton │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── singleton │ │ │ ├── MySingleton.java │ │ │ ├── MySingletonBeanManagedConcurrency.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── stateful │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── stateful │ │ │ ├── CartBean.java │ │ │ ├── ReentrantStatefulBean.java │ │ │ └── remote │ │ │ ├── Cart.java │ │ │ ├── CartBeanWithInterface.java │ │ │ └── TestServlet.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── ejb │ │ └── stateful │ │ ├── CartBeanStatefulnessTest.java │ │ ├── CartBeanTest.java │ │ ├── CartBeanWithInterfaceTest.java │ │ └── ReentrantCallTest.java ├── stateless │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── stateless │ │ │ ├── AccountSessionBean.java │ │ │ └── remote │ │ │ ├── Account.java │ │ │ ├── AccountSessionBeanWithInterface.java │ │ │ └── TestServlet.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── ejb │ │ └── stateless │ │ ├── AccountSessionBeanTest.java │ │ ├── AccountSessionBeanWithInterfaceTest.java │ │ └── AccountSessionStatelessnessTest.java └── timer │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── ejb │ │ │ └── timer │ │ │ ├── AutomaticTimerBean.java │ │ │ ├── MultipleScheduleTimerBean.java │ │ │ ├── Ping.java │ │ │ ├── PingsListener.java │ │ │ ├── ProgrammaticTimerBean.java │ │ │ └── SchedulesTimerBean.java │ └── webapp │ │ └── WEB-INF │ │ └── jboss-deployment-structure.xml │ └── test │ └── java │ └── org │ └── javaee7 │ └── ejb │ └── timer │ ├── AutomaticTimerBeanTest.java │ ├── MultipleScheduleTimerBeanTest.java │ ├── ProgrammaticTimerBeanTest.java │ ├── SchedulesTimerBeanTest.java │ └── WithinWindowMatcher.java ├── el ├── README.md ├── pom.xml └── standalone │ ├── pom.xml │ └── src │ └── test │ └── java │ └── org │ └── javaee7 │ └── el │ └── standalone │ └── ELResolverTest.java ├── interceptor ├── README.md ├── around-construct │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── interceptor │ │ │ └── aroundconstruct │ │ │ ├── Greeting.java │ │ │ ├── GreetingBean.java │ │ │ ├── GreetingParam.java │ │ │ ├── MyInterceptor.java │ │ │ ├── MyInterceptorBinding.java │ │ │ └── Param.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── interceptor │ │ │ └── aroundconstruct │ │ │ └── GreetingBeanTest.java │ │ └── resources │ │ └── beans.xml └── pom.xml ├── jacc ├── README.md ├── contexts │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jacc │ │ │ │ └── contexts │ │ │ │ ├── bean │ │ │ │ └── JaccRequestBean.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── RequestServlet.java │ │ │ │ ├── RequestServletEJB.java │ │ │ │ └── SubjectServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jacc │ │ └── contexts │ │ ├── RequestFromPolicyContextTest.java │ │ └── SubjectFromPolicyContextTest.java ├── permissions-xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jacc │ │ │ │ └── contexts │ │ │ │ ├── bean │ │ │ │ ├── BeanLeaf.java │ │ │ │ ├── BeanMessage.java │ │ │ │ ├── BeanMessageInterface.java │ │ │ │ ├── BeanRoot.java │ │ │ │ └── BeanRootInterface.java │ │ │ │ └── servlet │ │ │ │ └── TestServlet.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ ├── application.xml │ │ │ │ └── permissions.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jacc │ │ └── permissionsxml │ │ ├── PermissionsXMLEarTest.java │ │ └── PermissionsXMLServletTest.java └── pom.xml ├── jaspic ├── README.md ├── async-authentication │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── asyncauthentication │ │ │ │ ├── bean │ │ │ │ └── AsyncBean.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ └── AsyncServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── asyncauthentication │ │ └── AsyncAuthenticationPublicTest.java ├── basic-authentication │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── basicauthentication │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── basicauthentication │ │ ├── BasicAuthenticationProtectedTest.java │ │ ├── BasicAuthenticationPublicTest.java │ │ └── BasicAuthenticationStatelessTest.java ├── common │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── common │ │ ├── ArquillianBase.java │ │ ├── BaseServletContextListener.java │ │ ├── JaspicUtils.java │ │ ├── TestAuthConfigProvider.java │ │ ├── TestServerAuthConfig.java │ │ └── TestServerAuthContext.java ├── custom-principal │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── customprincipal │ │ │ │ ├── sam │ │ │ │ ├── MyPrincipal.java │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspictest │ │ └── customprincipal │ │ ├── CustomPrincipalProtectedTest.java │ │ ├── CustomPrincipalPublicTest.java │ │ └── CustomPrincipalStatelessTest.java ├── dispatching-jsf-cdi │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── dispatching │ │ │ │ ├── bean │ │ │ │ └── MyBean.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ForwardedServlet.java │ │ │ │ ├── IncludedServlet.java │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── beans.xml │ │ │ ├── faces-config.xml │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ │ ├── forward-cdi.xhtml │ │ │ ├── forward.xhtml │ │ │ ├── include-cdi.xhtml │ │ │ └── include.xhtml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspictest │ │ └── dispatching │ │ ├── CDIForwardTest.java │ │ ├── CDIIncludeTest.java │ │ ├── JSFCDIForwardTest.java │ │ ├── JSFCDIIncludeTest.java │ │ ├── JSFForwardTest.java │ │ └── JSFIncludeTest.java ├── dispatching │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── dispatching │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ForwardedServlet.java │ │ │ │ ├── IncludedServlet.java │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── dispatching │ │ ├── BasicForwardTest.java │ │ └── BasicIncludeTest.java ├── ejb-propagation │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── ejbpropagation │ │ │ │ ├── ejb │ │ │ │ ├── ProtectedEJB.java │ │ │ │ └── PublicEJB.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServletProtectedEJB.java │ │ │ │ ├── ProtectedServletPublicEJB.java │ │ │ │ ├── PublicServletProtectedEJB.java │ │ │ │ ├── PublicServletPublicEJB.java │ │ │ │ └── PublicServletPublicEJBLogout.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── ejbpropagation │ │ ├── ProtectedEJBPropagationTest.java │ │ ├── PublicEJBPropagationLogoutTest.java │ │ └── PublicEJBPropagationTest.java ├── ejb-register-session │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── registersession │ │ │ │ ├── ejb │ │ │ │ ├── ProtectedEJB.java │ │ │ │ └── PublicEJB.java │ │ │ │ ├── sam │ │ │ │ ├── MyPrincipal.java │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ ├── PublicServlet.java │ │ │ │ ├── PublicServletProtectedEJB.java │ │ │ │ └── PublicServletPublicEJB.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── registersession │ │ ├── RegisterSessionCustomPrincipalEJBPropagationTest.java │ │ └── RegisterSessionEJBPropagationTest.java ├── invoke-ejb-cdi │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── invoke │ │ │ │ ├── bean │ │ │ │ ├── CDIBean.java │ │ │ │ └── EJBBean.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── beans.xml │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspictest │ │ └── invoke │ │ ├── InvokeCDIBeanProtectedTest.java │ │ ├── InvokeCDIBeanPublicTest.java │ │ ├── InvokeEJBBeanProtectedTest.java │ │ └── InvokeEJBBeanPublicTest.java ├── jacc-propagation │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── jaccpropagation │ │ │ │ ├── jacc │ │ │ │ └── JACC.java │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── jaccpropagation │ │ ├── JACCPropagationProtectedTest.java │ │ └── JACCPropagationPublicTest.java ├── lifecycle │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── lifecycle │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestLifecycleAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── lifecycle │ │ ├── AuthModuleMethodInvocationTest.java │ │ └── IsMandatoryTest.java ├── pom.xml ├── programmatic-authentication │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── programmaticauthentication │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ └── AuthenticateServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── programmaticauthentication │ │ └── ProgrammaticAuthenticationTest.java ├── register-session │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── registersession │ │ │ │ ├── sam │ │ │ │ ├── MyPrincipal.java │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── registersession │ │ ├── RegisterSessionCustomPrincipalTest.java │ │ └── RegisterSessionTest.java ├── status-codes │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaspic │ │ │ │ └── statuscodes │ │ │ │ ├── sam │ │ │ │ ├── SamAutoRegistrationListener.java │ │ │ │ └── TestServerAuthModule.java │ │ │ │ └── servlet │ │ │ │ ├── ProtectedServlet.java │ │ │ │ └── PublicServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ ├── ibm-application-bnd.xml │ │ │ ├── jboss-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaspic │ │ └── statuscodes │ │ ├── ProtectedStatusCodesTest.java │ │ └── PublicStatusCodesTest.java └── wrapping │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaspic │ │ │ └── wrapping │ │ │ ├── sam │ │ │ ├── SamAutoRegistrationListener.java │ │ │ └── TestWrappingServerAuthModule.java │ │ │ └── servlet │ │ │ ├── DeclaredFilter.java │ │ │ ├── ProgrammaticFilter.java │ │ │ ├── ProtectedServlet.java │ │ │ ├── TestHttpServletRequestWrapper.java │ │ │ └── TestHttpServletResponseWrapper.java │ └── webapp │ │ └── WEB-INF │ │ ├── glassfish-web.xml │ │ ├── ibm-application-bnd.xml │ │ ├── jboss-web.xml │ │ └── web.xml │ └── test │ └── java │ └── org │ └── javaee7 │ └── jaspic │ └── wrapping │ └── WrappingTest.java ├── javamail ├── README.md ├── definition │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── javamail │ │ │ └── definition │ │ │ ├── AnnotatedEmailServlet.java │ │ │ ├── Credentials.java │ │ │ └── ProgrammaticEmailServlet.java │ │ └── webapp │ │ └── index.jsp └── pom.xml ├── jaxrpc ├── README.md ├── jaxrpc-endpoint │ ├── build.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrpc │ │ │ │ └── endpoint │ │ │ │ ├── HelloService.java │ │ │ │ └── HelloServiceImpl.java │ │ ├── resources │ │ │ ├── HelloService.xml │ │ │ ├── META-INF │ │ │ │ └── services │ │ │ │ │ └── javax.xml.soap.MessageFactory │ │ │ └── config.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── web.xml │ │ │ ├── webservices.xml │ │ │ └── wsdl │ │ │ ├── .gitignore │ │ │ └── README.md │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrpc │ │ └── endpoint │ │ └── HelloTest.java ├── jaxrpc-security │ ├── build.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrpc │ │ │ │ └── security │ │ │ │ ├── HelloService.java │ │ │ │ └── HelloServiceImpl.java │ │ ├── resources │ │ │ └── wscompile-server-config.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── sun-web.xml │ │ │ ├── web.xml │ │ │ ├── webservices.xml │ │ │ └── wsdl │ │ │ ├── .gitignore │ │ │ └── README.md │ │ └── test │ │ ├── java │ │ ├── org │ │ │ └── javaee7 │ │ │ │ └── jaxrpc │ │ │ │ └── security │ │ │ │ ├── ClientTestCallbackHandler.java │ │ │ │ └── HelloTest.java │ │ └── stub │ │ │ ├── .gitignore │ │ │ └── package-info.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ ├── client-security.xml │ │ ├── password.txt │ │ ├── s1as.cert │ │ └── wscompile-client-config.xml └── pom.xml ├── jaxrs ├── README.md ├── async-client │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── asyncclient │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── asyncclient │ │ └── MyResourceTest.java ├── async-server │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── asyncserver │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── asyncserver │ │ └── MyResourceTest.java ├── beanparam │ ├── README.adoc │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── beanparam │ │ │ ├── MyApplication.java │ │ │ ├── MyPathParams.java │ │ │ ├── MyQueryParams.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── beanparam │ │ └── MyResourceTest.java ├── beanvalidation │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── beanvalidation │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── beanvalidation │ │ └── MyResourceTest.java ├── client-negotiation │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── client │ │ │ └── negotiation │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ ├── People.java │ │ │ └── Person.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── client │ │ └── negotiation │ │ └── MyResourceTest.java ├── db-access │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrs │ │ │ │ └── dbaccess │ │ │ │ ├── Employee.java │ │ │ │ ├── EmployeeResource.java │ │ │ │ └── MyApplication.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── dbaccess │ │ └── EmployeeResourceTest.java ├── dynamicfilter │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── dynamicfilter │ │ │ ├── DynamicServerLogggingFilterFeature.java │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ └── ServerLoggingFilter.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── dynamicfilter │ │ └── MyResourceTest.java ├── fileupload │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── fileupload │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── fileupload │ │ └── MyResourceTest.java ├── filter-interceptor │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── sample │ │ │ └── filter │ │ │ └── interceptor │ │ │ ├── ClientLoggingFilter.java │ │ │ ├── MyApplication.java │ │ │ ├── MyClientReaderInterceptor.java │ │ │ ├── MyClientWriterInterceptor.java │ │ │ ├── MyResource.java │ │ │ ├── MyServerReaderInterceptor.java │ │ │ ├── MyServerWriterInterceptor.java │ │ │ ├── ServerLoggingFilter.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── filter │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── filter │ │ │ ├── ClientLoggingFilter.java │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ └── ServerLoggingFilter.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── filter │ │ └── MyResourceTest.java ├── interceptor │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── interceptor │ │ │ ├── MyApplication.java │ │ │ ├── MyClientReaderInterceptor.java │ │ │ ├── MyClientWriterInterceptor.java │ │ │ ├── MyResource.java │ │ │ ├── MyServerReaderInterceptor.java │ │ │ ├── MyServerWriterInterceptor.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── invocation-async │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── invocation │ │ │ └── async │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── invocation │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── invocation │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── jaxrs-client │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrs │ │ │ │ └── client │ │ │ │ ├── MyApplication.java │ │ │ │ ├── MyResource.java │ │ │ │ ├── People.java │ │ │ │ ├── Person.java │ │ │ │ └── PersonSessionBean.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── client │ │ └── MyResourceTest.java ├── jaxrs-endpoint │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── endpoint │ │ │ ├── Database.java │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── endpoint │ │ └── MyResourceTest.java ├── jaxrs-security-declarative │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrs │ │ │ │ └── security │ │ │ │ └── declarative │ │ │ │ ├── MyApplication.java │ │ │ │ └── MyResource.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── security │ │ │ └── declarative │ │ │ └── MyResourceTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── jsonp │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrs │ │ │ │ └── jsonp │ │ │ │ ├── MyApplication.java │ │ │ │ ├── MyArrayResource.java │ │ │ │ └── MyObjectResource.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── jsonp │ │ └── MyResourceTest.java ├── link │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── link │ │ │ ├── MyApplication.java │ │ │ └── MyResource.java │ │ └── webapp │ │ └── index.jsp ├── mapping-exceptions │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── mapping │ │ │ └── exceptions │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ ├── OrderNotFoundException.java │ │ │ └── OrderNotFoundExceptionMapper.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── mapping │ │ └── exceptions │ │ └── MyResourceTest.java ├── paramconverter │ ├── README.adoc │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── paramconverter │ │ │ ├── MyApplication.java │ │ │ ├── MyBean.java │ │ │ ├── MyBeanConverterProvider.java │ │ │ ├── MyConverterProvider.java │ │ │ └── MyResource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── paramconverter │ │ └── MyResourceTest.java ├── pom.xml ├── readerwriter-injection │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── readerwriter │ │ │ └── injection │ │ │ ├── AnotherObject.java │ │ │ ├── MyApplication.java │ │ │ ├── MyObject.java │ │ │ ├── MyReader.java │ │ │ ├── MyResource.java │ │ │ └── MyWriter.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── readerwriter │ │ └── injection │ │ └── MyResourceTest.java ├── readerwriter-json │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── readerwriter │ │ │ └── json │ │ │ ├── MyApplication.java │ │ │ ├── MyObject.java │ │ │ ├── MyReader.java │ │ │ ├── MyResource.java │ │ │ ├── MyWriter.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── readerwriter │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── readerwriter │ │ │ ├── MyApplication.java │ │ │ ├── MyObject.java │ │ │ ├── MyReader.java │ │ │ ├── MyResource.java │ │ │ └── MyWriter.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── readerwriter │ │ └── MyResourceTest.java ├── request-binding │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── request │ │ │ └── binding │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ └── TestServlet.java │ │ └── webapp │ │ └── index.jsp ├── resource-validation │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jaxrs │ │ │ │ └── resource │ │ │ │ └── validation │ │ │ │ ├── Email.java │ │ │ │ ├── EmailValidator.java │ │ │ │ ├── MyApplication.java │ │ │ │ ├── Name.java │ │ │ │ ├── NameAddResource.java │ │ │ │ ├── NameResource1.java │ │ │ │ ├── NameResource2.java │ │ │ │ ├── NameResource3.java │ │ │ │ ├── NotNullAndNonEmptyNames.java │ │ │ │ └── TestServlet.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── resource │ │ └── validation │ │ └── NameAddResourceTest.java ├── server-negotiation │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── server │ │ │ └── negotiation │ │ │ ├── MyApplication.java │ │ │ ├── MyResource.java │ │ │ ├── People.java │ │ │ └── Person.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── server │ │ └── negotiation │ │ └── MyResourceTest.java ├── simple-get │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxrs │ │ │ └── simple │ │ │ └── get │ │ │ ├── JaxRsActivator.java │ │ │ └── Resource.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── simple │ │ └── get │ │ └── JAXRSSimpleGetTest.java └── singleton │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxrs │ │ └── singleton │ │ ├── AnnotatedSingletonResource.java │ │ ├── ApplicationSingletonResource.java │ │ ├── MyAnnotatedApplication.java │ │ └── MyApplication.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── jaxrs │ └── singleton │ ├── AnnotatedSingletonResourceTest.java │ └── ApplicationSingletonResourceTest.java ├── jaxws ├── README.md ├── jaxws-client │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── wsdl │ │ │ ├── EBookStoreImplService.wsdl │ │ │ └── EBookStoreImplService_schema1.xsd │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxws │ │ └── client │ │ └── EBookStoreClientSampleTest.java ├── jaxws-endpoint-ejb │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxws │ │ │ └── endpoint │ │ │ └── ejb │ │ │ ├── EBookStore.java │ │ │ └── EBookStoreImpl.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxws │ │ └── endpoint │ │ └── ejb │ │ └── EBookStoreTest.java ├── jaxws-endpoint │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jaxws │ │ │ └── endpoint │ │ │ ├── EBook.java │ │ │ ├── EBookStore.java │ │ │ └── EBookStoreImpl.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jaxws │ │ └── endpoint │ │ └── EBookStoreTest.java └── pom.xml ├── jca ├── README.md ├── connector-simple │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jca │ │ │ └── connector │ │ │ └── simple │ │ │ └── connector │ │ │ ├── MyResoureAdapter.java │ │ │ ├── cci │ │ │ ├── MyInteractionSpec.java │ │ │ ├── MyOrderRecord.java │ │ │ └── MyResponseRecord.java │ │ │ └── outbound │ │ │ ├── MyConnection.java │ │ │ ├── MyConnectionFactory.java │ │ │ ├── MyInteraction.java │ │ │ ├── MyManagedConnection.java │ │ │ └── MyManagedConnectionFactory.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jca │ │ └── connector │ │ └── simple │ │ └── connector │ │ └── AppTest.java ├── mdb-filewatcher │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jca │ │ │ └── filewatch │ │ │ ├── adapter │ │ │ ├── FileSystemWatcher.java │ │ │ ├── FileSystemWatcherActivationSpec.java │ │ │ ├── FileSystemWatcherResourceAdapter.java │ │ │ └── WatchingThread.java │ │ │ ├── event │ │ │ ├── Created.java │ │ │ ├── Deleted.java │ │ │ ├── FileEvent.java │ │ │ └── Modified.java │ │ │ └── mdb │ │ │ └── FileWatchingMDB.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jca │ │ │ └── filewatch │ │ │ └── FileWatcherTest.java │ │ ├── resources-jbosseap-remote │ │ └── arquillian.xml │ │ ├── resources-wildfly-managed │ │ └── arquillian.xml │ │ ├── resources-wildfly-remote │ │ └── arquillian.xml │ │ └── resources │ │ ├── glassfish-ejb-jar.xml │ │ └── jboss-ejb3.xml └── pom.xml ├── jms ├── README.md ├── jms-batch │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jms │ │ │ │ └── batch │ │ │ │ ├── JmsItemReader.java │ │ │ │ ├── Resources.java │ │ │ │ ├── ResultCollector.java │ │ │ │ ├── SubscriptionCreator.java │ │ │ │ └── SummingItemWriter.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── batch-jobs │ │ │ └── jms-job.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jms │ │ └── batch │ │ └── JmsItemReaderTest.java ├── jms-xa │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jms │ │ │ │ └── xa │ │ │ │ ├── DeliveryStats.java │ │ │ │ ├── JMSListener.java │ │ │ │ ├── JMSSender.java │ │ │ │ ├── User.java │ │ │ │ └── UserManager.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jms │ │ └── xa │ │ ├── UserManagerNonXATest.java │ │ ├── UserManagerXATest.java │ │ ├── producers │ │ ├── NonXAConnectionFactoryProducer.java │ │ └── XAConnectionFactoryProducer.java │ │ └── utils │ │ └── AbstractUserManagerTest.java ├── pom.xml ├── send-receive │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jms │ │ │ │ └── send │ │ │ │ └── receive │ │ │ │ ├── Resources.java │ │ │ │ ├── classic │ │ │ │ ├── ClassicMessageReceiver.java │ │ │ │ └── ClassicMessageSender.java │ │ │ │ ├── mdb │ │ │ │ └── MessageReceiverAsync.java │ │ │ │ └── simple │ │ │ │ ├── MessageReceiverSync.java │ │ │ │ ├── MessageSenderAsync.java │ │ │ │ ├── MessageSenderSync.java │ │ │ │ └── appmanaged │ │ │ │ ├── MessageReceiverAppManaged.java │ │ │ │ └── MessageSenderAppManaged.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── beans.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jms │ │ │ └── send │ │ │ └── receive │ │ │ ├── SyncTest.java │ │ │ └── mdb │ │ │ ├── AsyncTest.java │ │ │ ├── ReceptionSynchronizer.java │ │ │ └── ReceptionSynchronizerTest.java │ │ └── resources │ │ └── WEB-INF │ │ └── ejb-jar.xml └── temp-destination │ ├── pom.xml │ └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jms │ │ └── temp │ │ └── destination │ │ ├── JmsClient.java │ │ ├── RequestResponseOverJMS.java │ │ └── Resources.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── jms │ └── temp │ └── destination │ └── TempQueueTest.java ├── jpa ├── README.md ├── aggregate-function-in-select │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── aggregate_function_in_select │ │ │ │ ├── entity │ │ │ │ ├── AggregatedTestEntity.java │ │ │ │ └── TestEntity.java │ │ │ │ └── service │ │ │ │ └── TestService.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── aggregate_function_in_select │ │ └── AggregateFunctionInSelectTest.java ├── criteria │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── criteria │ │ │ │ ├── Movie.java │ │ │ │ ├── MovieBean.java │ │ │ │ └── Movie_.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── criteria │ │ └── JpaCriteriaTest.java ├── datasourcedefinition-annotation-pu │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── datasourcedefinition_annotation_pu │ │ │ │ ├── config │ │ │ │ └── DataSourceDefinitionConfig.java │ │ │ │ ├── entity │ │ │ │ └── TestEntity.java │ │ │ │ └── service │ │ │ │ └── TestService.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── datasourcedefinition_annotation_pu │ │ └── DataSourceDefinitionAnnotationPuTest.java ├── datasourcedefinition-applicationxml-pu │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── datasourcedefinition_applicationxml_pu │ │ │ │ ├── entity │ │ │ │ └── TestEntity.java │ │ │ │ └── service │ │ │ │ └── TestService.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── persistence.xml │ │ │ ├── application-ejb.xml │ │ │ └── application-web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── datasourcedefinition_applicationxml_pu │ │ ├── DataSourceDefinitionApplicationXMLPuEJBTest.java │ │ └── DataSourceDefinitionApplicationXMLPuWebTest.java ├── datasourcedefinition-webxml-pu │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── datasourcedefinition_webxml_pu │ │ │ │ ├── entity │ │ │ │ └── TestEntity.java │ │ │ │ └── service │ │ │ │ └── TestService.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── datasourcedefinition_webxml_pu │ │ └── DataSourceDefinitionWebxmlPuTest.java ├── datasourcedefinition │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jpa │ │ │ └── datasourcedefinition │ │ │ └── DataSourceDefinitionHolder.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── datasourcedefinition │ │ └── DataSourceDefinitionTest.java ├── default-datasource │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── defaultdatasource │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeService.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── defaultdatasource │ │ └── EmployeeServiceTest.java ├── dynamic-named-query │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── dynamicnamedquery │ │ │ │ ├── entity │ │ │ │ ├── TestEntity.java │ │ │ │ └── TestEntity_.java │ │ │ │ └── service │ │ │ │ ├── QueryRepository.java │ │ │ │ └── TestService.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── dynamicnamedquery │ │ └── DynamicNamedQueryTest.java ├── entitygraph │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── entitygraph │ │ │ │ ├── Movie.java │ │ │ │ ├── MovieActor.java │ │ │ │ ├── MovieActorAward.java │ │ │ │ ├── MovieAward.java │ │ │ │ ├── MovieBean.java │ │ │ │ ├── MovieDirector.java │ │ │ │ └── Movie_.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── entitygraph │ │ └── EntityGraphTest.java ├── extended-pc │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── extended │ │ │ │ └── pc │ │ │ │ ├── Character.java │ │ │ │ └── CharactersBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── extended │ │ └── pc │ │ └── ExtendedPersistenceContextTest.java ├── jndi-context │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── jndi │ │ │ │ └── context │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── jndi │ │ └── context │ │ └── EntityManagerJndiContextTest.java ├── jpa-converter │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── converter │ │ │ │ ├── CreditCard.java │ │ │ │ ├── CreditCardConverter.java │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeRepository.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ ├── create.sql │ │ │ │ ├── drop.sql │ │ │ │ ├── load.sql │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── converter │ │ └── EmployeeRepositoryTest.java ├── listeners-injection │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── listeners │ │ │ │ ├── Language.java │ │ │ │ ├── LanguageConverter.java │ │ │ │ ├── Movie.java │ │ │ │ ├── MovieBean.java │ │ │ │ ├── MovieListener.java │ │ │ │ ├── Rating.java │ │ │ │ └── RatingService.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── listeners │ │ └── JpaListenerInjectionTest.java ├── listeners │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── listeners │ │ │ │ ├── Movie.java │ │ │ │ ├── MovieBean.java │ │ │ │ └── MovieListener.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── listeners │ │ └── JpaListenersTest.java ├── locking-optimistic │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── locking │ │ │ │ └── optimistic │ │ │ │ ├── Movie.java │ │ │ │ └── MovieBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── locking │ │ └── optimistic │ │ ├── LockingOptimisticTest.java │ │ └── MovieBeanAlternative.java ├── locking-pessimistic │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jpa │ │ │ └── locking │ │ │ └── pessimistic │ │ │ ├── Movie.java │ │ │ ├── MovieBean.java │ │ │ └── TestServlet.java │ │ ├── resources │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── webapp │ │ ├── WEB-INF │ │ └── beans.xml │ │ └── index.jsp ├── multiple-pu │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── multiple │ │ │ │ └── pu │ │ │ │ ├── Movie.java │ │ │ │ ├── MultiplePuBean.java │ │ │ │ └── ProductCode.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── multiple │ │ └── pu │ │ └── MultiplePuTest.java ├── native-sql-resultset-mapping │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── nativesql │ │ │ │ └── resultset │ │ │ │ └── mapping │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── nativesql │ │ └── resultset │ │ └── mapping │ │ └── JpaNativeSqlResultSetMappingTest.java ├── native-sql │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── nativesql │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── nativesql │ │ └── JpaNativeSqlTest.java ├── ordercolumn │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── ordercolumn │ │ │ │ ├── entity │ │ │ │ ├── bidirectionaljoin │ │ │ │ │ ├── Child.java │ │ │ │ │ └── Parent.java │ │ │ │ ├── bidirectionalmappedby │ │ │ │ │ ├── Child.java │ │ │ │ │ └── Parent.java │ │ │ │ └── unidirectional │ │ │ │ │ ├── Child.java │ │ │ │ │ └── Parent.java │ │ │ │ └── service │ │ │ │ ├── bidirectionaljoin │ │ │ │ └── OrderColumnTesterService.java │ │ │ │ ├── bidirectionalmappedby │ │ │ │ └── OrderColumnTesterService.java │ │ │ │ └── unidirectional │ │ │ │ └── OrderColumnTesterService.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── ordercolumn │ │ ├── OrderColumnBiJoinTest.java │ │ ├── OrderColumnBiMappedByTest.java │ │ └── OrderColumnUniTest.java ├── pom.xml ├── pu-typesafe │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── pu │ │ │ │ └── typesafe │ │ │ │ ├── DefaultDatabase.java │ │ │ │ ├── Movie.java │ │ │ │ ├── MySessionBean.java │ │ │ │ └── ProducerBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── .LCKcreate.sql~ │ │ │ ├── .LCKpersistence.xml~ │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── pu │ │ └── typesafe │ │ └── PuTypesafeTest.java ├── schema-gen-index │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── index │ │ │ │ ├── Employee.java │ │ │ │ └── StartupBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── index │ │ └── SchemaGenIndexTest.java ├── schema-gen-metadata │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── schemagen │ │ │ │ └── metadata │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── schemagen │ │ └── metadata │ │ └── EmployeeBeanTest.java ├── schema-gen-scripts-external │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpasamples │ │ │ │ └── schema │ │ │ │ └── gen │ │ │ │ └── scripts │ │ │ │ └── external │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpasamples │ │ └── schema │ │ └── gen │ │ └── scripts │ │ └── external │ │ └── SchemaGenScriptsExternalTest.java ├── schema-gen-scripts-generate │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpasamples │ │ │ │ └── schema │ │ │ │ └── gen │ │ │ │ └── scripts │ │ │ │ └── generate │ │ │ │ ├── Employee.java │ │ │ │ └── StartupBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpasamples │ │ └── schema │ │ └── gen │ │ └── scripts │ │ └── generate │ │ └── SchemaGenScriptsTest.java ├── schema-gen-scripts │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── schemagen │ │ │ │ └── scripts │ │ │ │ ├── Employee.java │ │ │ │ ├── EmployeeBean.java │ │ │ │ └── TestServlet.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ ├── create.sql │ │ │ │ ├── drop.sql │ │ │ │ ├── load.sql │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── schemagen │ │ └── scripts │ │ └── EmployeeBeanTest.java ├── storedprocedure │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jpa │ │ │ │ └── storedprocedure │ │ │ │ ├── Movie.java │ │ │ │ └── MovieBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── storedprocedure │ │ └── StoredProcedureTest.java └── unsynchronized-pc │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── jpa │ │ └── unsynchronized │ │ └── pc │ │ ├── Employee.java │ │ ├── EmployeeBean.java │ │ └── TestServlet.java │ ├── resources │ └── META-INF │ │ ├── create.sql │ │ ├── drop.sql │ │ ├── load.sql │ │ └── persistence.xml │ └── webapp │ └── index.jsp ├── jsf ├── README.md ├── ajax │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── ajax │ │ │ ├── User.java │ │ │ └── UserService.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ └── stylesheets │ │ └── main.css ├── bean-validation │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jsf │ │ │ │ └── bean │ │ │ │ └── validation │ │ │ │ └── MyBean.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── index.xhtml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jsf │ │ └── bean │ │ └── validation │ │ └── MyBeanTest.java ├── components │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── components │ │ │ ├── MyBean.java │ │ │ └── Person.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── images │ │ └── glassfish.png │ │ ├── index.xhtml │ │ ├── next.xhtml │ │ ├── resources │ │ └── stylesheets │ │ │ └── main.css │ │ └── scripts │ │ └── main.js ├── composite-component │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── composite │ │ │ └── component │ │ │ ├── User.java │ │ │ └── UserService.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ ├── template.xhtml │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ ├── css │ │ │ ├── cssLayout.css │ │ │ └── default.css │ │ ├── ezcomp │ │ │ └── login.xhtml │ │ └── stylesheets │ │ │ └── main.css │ │ └── status.xhtml ├── contracts-library-impl │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── META-INF │ │ └── contracts │ │ ├── blue │ │ ├── cssLayout.css │ │ ├── default.css │ │ ├── javax.faces.contract.xml │ │ └── template.xhtml │ │ └── red │ │ ├── cssLayout.css │ │ ├── default.css │ │ ├── javax.faces.contract.xml │ │ └── template.xhtml ├── contracts-library │ ├── pom.xml │ └── src │ │ └── main │ │ └── webapp │ │ ├── WEB-INF │ │ ├── lib │ │ │ └── contracts-library-impl-1.0-SNAPSHOT.jar │ │ └── web.xml │ │ ├── index-blue.xhtml │ │ └── index-red.xhtml ├── contracts │ ├── faces-config.NavData │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── contracts │ │ │ └── ContractsBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ ├── faces-config.xml │ │ └── web.xml │ │ ├── contracts │ │ ├── blue │ │ │ ├── cssLayout.css │ │ │ ├── default.css │ │ │ └── template.xhtml │ │ └── red │ │ │ ├── cssLayout.css │ │ │ ├── default.css │ │ │ └── template.xhtml │ │ ├── index.xhtml │ │ └── user │ │ └── index.xhtml ├── file-upload │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── file │ │ │ └── upload │ │ │ └── FileUploadBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── ajax-upload.xhtml │ │ └── index.xhtml ├── flows-declarative │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── flows │ │ │ └── declarative │ │ │ ├── Flow1Bean.java │ │ │ └── Flow2Bean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── flow1 │ │ ├── flow1-flow.xml │ │ ├── flow1.xhtml │ │ ├── flow1a.xhtml │ │ └── flow1b.xhtml │ │ ├── flow2 │ │ ├── flow2-flow.xml │ │ ├── flow2.xhtml │ │ ├── flow2a.xhtml │ │ └── flow2b.xhtml │ │ ├── index.xhtml │ │ └── return.xhtml ├── flows-mixed │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── flows │ │ │ └── mixed │ │ │ ├── Flow1.java │ │ │ ├── Flow1Bean.java │ │ │ └── Flow2Bean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── flow1 │ │ ├── flow1.xhtml │ │ ├── flow1a.xhtml │ │ └── flow1b.xhtml │ │ ├── flow2 │ │ ├── flow2-flow.xml │ │ ├── flow2.xhtml │ │ ├── flow2a.xhtml │ │ └── flow2b.xhtml │ │ ├── index.xhtml │ │ ├── nonFlow.xhtml │ │ └── return.xhtml ├── flows-programmatic │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── flows │ │ │ └── programmatic │ │ │ ├── Flow1.java │ │ │ ├── Flow1Bean.java │ │ │ ├── Flow2.java │ │ │ └── Flow2Bean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── flow1 │ │ ├── flow1.xhtml │ │ ├── flow1a.xhtml │ │ └── flow1b.xhtml │ │ ├── flow2 │ │ ├── flow2.xhtml │ │ ├── flow2a.xhtml │ │ └── flow2b.xhtml │ │ ├── index.xhtml │ │ └── return.xhtml ├── flows-simple │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── flow │ │ │ ├── Flow1.java │ │ │ └── Flow1Bean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── flow1 │ │ ├── flow1-flow.xml │ │ ├── flow1.xhtml │ │ ├── flow1a.xhtml │ │ └── flow1b.xhtml │ │ └── index.xhtml ├── http-get │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jsf │ │ │ │ └── http │ │ │ │ └── get │ │ │ │ └── User.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── beans.xml │ │ │ └── web.xml │ │ │ ├── index.xhtml │ │ │ ├── index2.xhtml │ │ │ └── login.xhtml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── jsf │ │ └── http │ │ └── get │ │ └── UserTest.java ├── passthrough │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── passthrough │ │ │ └── UserBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index-after.xhtml │ │ ├── index-before.xhtml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ ├── cssLayout.css │ │ │ └── default.css │ │ └── template.xhtml ├── pom.xml ├── radio-buttons │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── radio │ │ │ └── buttons │ │ │ ├── Movie.java │ │ │ └── MovieBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── details.xhtml │ │ └── index.xhtml ├── resource-handling │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── resource │ │ │ └── handling │ │ │ ├── CustomerSessionBean.java │ │ │ └── Name.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── template.xhtml │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ ├── .DS_Store │ │ ├── corp │ │ └── sun-logo.png │ │ ├── css │ │ ├── cssLayout.css │ │ └── default.css │ │ ├── scripts │ │ └── myScript.js │ │ └── wildfly.png ├── server-extension │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jsf │ │ │ └── server │ │ │ └── extension │ │ │ ├── .t.swp │ │ │ ├── MyConverter.java │ │ │ ├── NameValidator.java │ │ │ ├── User.java │ │ │ └── UserAge.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── converter.xhtml │ │ └── index.xhtml └── viewscoped │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── jsf │ │ └── viewscoped │ │ └── MyBean.java │ └── webapp │ ├── WEB-INF │ ├── beans.xml │ ├── template.xhtml │ └── web.xml │ ├── index.xhtml │ ├── index2.xhtml │ └── resources │ ├── css │ ├── cssLayout.css │ └── default.css │ └── ezcomp │ └── out.xhtml ├── json ├── README.md ├── object-builder │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── json │ │ └── object │ │ └── builder │ │ └── DOMGeneratorTest.java ├── object-reader │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── json │ │ │ └── object │ │ │ └── reader │ │ │ ├── JsonReaderFromReaderTest.java │ │ │ └── JsonReaderFromStreamTest.java │ │ └── resources │ │ ├── 1.json │ │ ├── 2.json │ │ ├── 3.json │ │ └── 4.json ├── pom.xml ├── streaming-generate │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── json │ │ └── streaming │ │ └── generate │ │ └── StreamingGeneratorTest.java └── streaming-parser │ ├── pom.xml │ └── src │ └── test │ ├── java │ └── org │ │ └── javaee7 │ │ └── json │ │ └── streaming │ │ └── parser │ │ ├── JsonParserFromReaderTest.java │ │ └── JsonParserFromStreamTest.java │ └── resources │ ├── 1.json │ ├── 2.json │ ├── 3.json │ └── 4.json ├── jta ├── README.md ├── pom.xml ├── transactional │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── jta │ │ │ ├── transaction │ │ │ └── scope │ │ │ │ ├── MyTransactionScopedBean.java │ │ │ │ └── MyTransactionalBean.java │ │ │ └── transactional │ │ │ └── MyTransactionalTxTypeBean.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jta │ │ │ ├── transaction │ │ │ └── scope │ │ │ │ ├── MyTransactionalBeanTest.java │ │ │ │ └── MyTransactionalBeanWithUserTransactionTest.java │ │ │ └── transactional │ │ │ └── MyTransactionalTxTypeBeanTest.java │ │ └── resources │ │ └── beans.xml ├── tx-exception │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── jta │ │ │ │ └── tx │ │ │ │ └── exception │ │ │ │ ├── Employee.java │ │ │ │ └── EmployeeBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── create.sql │ │ │ ├── drop.sql │ │ │ ├── load.sql │ │ │ └── persistence.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── jta │ │ │ └── tx │ │ │ └── exception │ │ │ └── EmployeeBeanTest.java │ │ └── resources │ │ └── beans.xml └── user-transaction │ ├── pom.xml │ └── src │ └── test │ ├── java │ └── org │ │ └── javaee7 │ │ └── jta │ │ └── user │ │ └── transaction │ │ └── UserTransactionTest.java │ └── resources │ └── beans.xml ├── pom.xml ├── servlet ├── README.md ├── async-servlet │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── async │ │ │ └── MyAsyncServlet.java │ │ └── webapp │ │ └── index.jsp ├── cookies │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── cookies │ │ │ │ ├── ClientCookieServlet.java │ │ │ │ └── TestServlet.java │ │ └── webapp │ │ │ ├── index-cookies.jsp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── cookies │ │ └── SimpleServletTest.java ├── error-mapping │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── error │ │ │ │ └── mapping │ │ │ │ ├── ErrorServlet.java │ │ │ │ ├── NotFoundServlet.java │ │ │ │ └── TestServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── error │ │ └── mapping │ │ └── ErrorMappingTest.java ├── event-listeners │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── event │ │ │ │ └── listeners │ │ │ │ ├── MyContextAttributeListener.java │ │ │ │ ├── MyContextListener.java │ │ │ │ ├── MyHttpSessionActivationListener.java │ │ │ │ ├── MyHttpSessionAttributeListener.java │ │ │ │ ├── MyHttpSessionBindingListener.java │ │ │ │ ├── MyServletRequestAttributeListener.java │ │ │ │ ├── MyServletRequestListener.java │ │ │ │ ├── MySessionIdListener.java │ │ │ │ ├── MySessionListener.java │ │ │ │ └── TestServlet.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── event │ │ └── listeners │ │ └── EventListenerTest.java ├── file-upload │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── file │ │ │ └── upload │ │ │ └── TestServlet.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── file │ │ └── upload │ │ └── FileUploadTest.java ├── metadata-complete │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── metadata │ │ │ │ └── complete │ │ │ │ └── TestServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── metadata │ │ └── complete │ │ └── TestServletTest.java ├── nonblocking │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── nonblocking │ │ │ ├── MyReadListener.java │ │ │ ├── MyWriteListener.java │ │ │ ├── ReadTestServlet.java │ │ │ ├── TestClient.java │ │ │ └── WriteTestServlet.java │ │ └── webapp │ │ └── index.jsp ├── pom.xml ├── programmatic-registration │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── programmatic │ │ │ └── registration │ │ │ ├── DynamicServlet.java │ │ │ └── SimpleServletContextListener.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── programmatic │ │ └── registration │ │ └── DynamicServletTest.java ├── protocol-handler │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── protocolhandler │ │ │ │ ├── MyProtocolHandler.java │ │ │ │ └── UpgradeServlet.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── protocolhandler │ │ └── ProtocolHandlerTest.java ├── resource-packaging │ ├── pom.xml │ └── src │ │ ├── main │ │ └── webapp │ │ │ └── WEB-INF │ │ │ └── lib │ │ │ └── myResources.jar │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── resource │ │ └── packaging │ │ └── ResourcePackagingTest.java ├── security-allow-uncovered │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── allow │ │ │ │ └── uncovered │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── allow │ │ │ └── uncovered │ │ │ └── SecureServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-annotated │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── annotated │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── annotated │ │ │ └── SecureServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-basicauth-omission │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── basicauth │ │ │ │ └── omission │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── basicauth │ │ │ └── omission │ │ │ └── SecureServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-basicauth │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── basicauth │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── basicauth │ │ │ └── SecureServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-clientcert-jce │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── clientcert │ │ │ │ └── jce │ │ │ │ ├── BouncyServlet.java │ │ │ │ ├── MyJCECertificateFactory.java │ │ │ │ ├── MyJCEX509Certificate.java │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── security │ │ └── clientcert │ │ └── jce │ │ └── SecureServletTest.java ├── security-clientcert │ ├── .gitignore │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── clientcert │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── security │ │ └── clientcert │ │ └── SecureServletTest.java ├── security-deny-uncovered │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── deny │ │ │ │ └── uncovered │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── deny │ │ │ └── uncovered │ │ │ └── SecureServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-digest │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── digest │ │ │ │ ├── DatabaseSetup.java │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── security │ │ └── digest │ │ └── SecureServletTest.java ├── security-form-based │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── security │ │ │ │ └── form │ │ │ │ └── based │ │ │ │ ├── ErrorServlet.java │ │ │ │ ├── LoginServlet.java │ │ │ │ └── SecureServlet.java │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── security │ │ │ └── form │ │ │ └── based │ │ │ └── FormTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── security-programmatic │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── programmatic │ │ │ │ └── login │ │ │ │ └── LoginServlet.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ └── index.jsp │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── programmatic │ │ │ └── login │ │ │ └── LoginServletTest.java │ │ └── resources │ │ ├── addUsersPayara.txt │ │ └── password.txt ├── servlet-filters │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── filters │ │ │ ├── CharResponseWrapper.java │ │ │ ├── FooBarFilter.java │ │ │ └── TestServlet.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── filters │ │ └── FilterServletTest.java ├── servlet-libs │ ├── empty-app-servlet-lib │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── servlet │ │ │ └── servlet_libs │ │ │ └── empty │ │ │ └── app │ │ │ └── EmptyAppWithLibTest.java │ ├── pom.xml │ └── servlet-lib │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── servlet_libs │ │ └── basic │ │ └── servlet │ │ └── BasicServlet.java ├── simple-servlet │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── servlet │ │ │ │ └── simple │ │ │ │ └── SimpleServlet.java │ │ └── webapp │ │ │ └── index.jsp │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── metadata │ │ └── complete │ │ └── SimpleServletTest.java └── web-fragment │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── servlet │ │ └── web │ │ └── fragment │ │ └── TestServlet.java │ └── webapp │ ├── WEB-INF │ └── lib │ │ └── my-web-fragment.jar │ └── index.jsp ├── test-utils ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ ├── CliCommands.java │ │ ├── Libraries.java │ │ ├── Parameter.java │ │ ├── ParameterRule.java │ │ ├── RemoteEJBContextFactory.java │ │ ├── RemoteEJBContextProvider.java │ │ ├── ServerOperations.java │ │ └── util │ │ └── BatchTestHelper.java │ └── resources │ ├── arquillian-swarm.xml │ ├── arquillian.xml │ ├── server.xml │ └── tomcat-users.xml ├── validation ├── README.md ├── custom-constraint │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── javaee7 │ │ │ │ └── validation │ │ │ │ └── custom │ │ │ │ └── constraint │ │ │ │ ├── MyBean.java │ │ │ │ ├── ZipCode.java │ │ │ │ └── ZipCodeValidator.java │ │ └── resources │ │ │ └── ValidationMessages.properties │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── validation │ │ └── custom │ │ └── constraint │ │ └── CustomConstraintTest.java ├── methods │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── javaee7 │ │ │ └── validation │ │ │ └── methods │ │ │ ├── MyBean.java │ │ │ ├── MyBean2.java │ │ │ └── MyParameter.java │ │ └── test │ │ └── java │ │ └── org │ │ └── javaee7 │ │ └── validation │ │ └── methods │ │ ├── ConstructorParametersConstraintsTest.java │ │ ├── ConstructorParametersInjectionTest.java │ │ └── MethodParametersConstraintsTest.java └── pom.xml └── websocket ├── README.md ├── atmosphere-chat ├── overlays │ ├── org.atmosphere.client.javascript-2.0.7.info │ └── org.atmosphere.client.javascript-2.0.7 │ │ ├── WEB-INF │ │ └── web.xml │ │ └── javascript │ │ ├── atmosphere-min.js │ │ └── atmosphere.js ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── atmosphere │ │ ├── ChatEndpoint.java │ │ ├── JacksonDecoder.java │ │ ├── JacksonEncoder.java │ │ └── Message.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.html │ └── javascript │ ├── application.js │ └── jquery-1.9.0.js ├── binary ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── websocket │ │ │ └── binary │ │ │ ├── MyEndpointByteArray.java │ │ │ ├── MyEndpointByteBuffer.java │ │ │ ├── MyEndpointClient.java │ │ │ └── MyEndpointInputStream.java │ └── webapp │ │ ├── index.jsp │ │ └── websocket.js │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── binary │ └── test │ └── MyEndpointTest.java ├── chat ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── websocket │ │ │ └── chat │ │ │ ├── ChatClientEndpoint1.java │ │ │ ├── ChatClientEndpoint2.java │ │ │ └── ChatEndpoint.java │ └── webapp │ │ ├── index.jsp │ │ └── websocket.js │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── chat │ └── ChatTest.java ├── encoder-client ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── encoder │ │ └── client │ │ ├── MyClient.java │ │ ├── MyEndpoint.java │ │ ├── MyMessage.java │ │ ├── MyMessageDecoder.java │ │ └── MyMessageEncoder.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── encoder │ └── client │ └── MyClientTest.java ├── encoder-programmatic ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── encoder │ │ └── programmatic │ │ ├── MyClient.java │ │ ├── MyEndpoint.java │ │ ├── MyEndpointConfiguration.java │ │ ├── MyMessage.java │ │ ├── MyMessageDecoder.java │ │ └── MyMessageEncoder.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── encoder │ └── programmatic │ └── MyClientTest.java ├── encoder ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── websocket │ │ │ └── encoder │ │ │ ├── MyEndpoint.java │ │ │ ├── MyEndpointClientEmptyJSONArray.java │ │ │ ├── MyEndpointClientJSONObject.java │ │ │ ├── MyMessage.java │ │ │ ├── MyMessageDecoder.java │ │ │ └── MyMessageEncoder.java │ └── webapp │ │ ├── index.jsp │ │ └── websocket.js │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── encoder │ └── EncoderEndpointTest.java ├── endpoint-async ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── javaee7 │ │ │ └── websocket │ │ │ └── endpoint │ │ │ └── async │ │ │ ├── MyAsyncEndpointByteBuffer.java │ │ │ ├── MyAsyncEndpointByteBufferClient.java │ │ │ ├── MyAsyncEndpointText.java │ │ │ └── MyAsyncEndpointTextClient.java │ └── webapp │ │ ├── index.jsp │ │ └── websocket.js │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── endpoint │ └── async │ └── MyAsyncEndpointTest.java ├── endpoint-config ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── config │ │ ├── MyConfigurator.java │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-javatypes ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── javatypes │ │ ├── MyEndpoint.java │ │ ├── MyEndpointFloat.java │ │ ├── MyEndpointInt.java │ │ └── MyEndpointReader.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-partial ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── endpoint │ │ └── multipart │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-programmatic-async ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── programmatic │ │ └── async │ │ ├── MyApplicationConfig.java │ │ ├── MyEndpointFuture.java │ │ └── MyEndpointHandler.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-programmatic-config ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── programmatic │ │ └── config │ │ ├── MyApplicationConfig.java │ │ ├── MyConfigurator.java │ │ └── MyEndpoint.java │ └── webapp │ ├── WEB-INF │ └── beans.xml │ ├── index.jsp │ └── websocket.js ├── endpoint-programmatic-injection ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── programmatic │ │ ├── MyApplicationConfig.java │ │ ├── MyBean.java │ │ ├── MyEndpoint.java │ │ └── MySessionBean.java │ └── webapp │ ├── WEB-INF │ └── beans.xml │ ├── index.jsp │ └── websocket.js ├── endpoint-programmatic-partial ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── endpoint │ │ └── programmatic │ │ └── partial │ │ ├── MyEndpoint.java │ │ └── MyEndpointConfiguration.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-programmatic ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── programmatic │ │ ├── MyEndpoint.java │ │ ├── MyEndpointBinaryClient.java │ │ ├── MyEndpointConfig.java │ │ └── MyEndpointTextClient.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── endpoint │ └── programmatic │ └── MyEndpointTest.java ├── endpoint-security ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── security │ │ └── MyEndpoint.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.jsp │ └── websocket.js ├── endpoint-singleton ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── singleton │ │ ├── MyConfigurator.java │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── endpoint-wss ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ └── wss │ │ └── MyEndpoint.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.jsp │ └── websocket.js ├── endpoint ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── endpoint │ │ ├── MyEndpointByteArray.java │ │ ├── MyEndpointByteArrayClient.java │ │ ├── MyEndpointByteBuffer.java │ │ ├── MyEndpointByteBufferClient.java │ │ ├── MyEndpointInputStream.java │ │ ├── MyEndpointInputStreamClient.java │ │ ├── MyEndpointText.java │ │ └── MyEndpointTextClient.java │ └── test │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── endpoint │ └── MyEndpointTest.java ├── httpsession ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── httpsession │ │ ├── MyApplicationConfig.java │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── injection ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── injection │ │ ├── Logging.java │ │ ├── LoggingInterceptor.java │ │ ├── MyBean.java │ │ ├── MyEndpointWithCDI.java │ │ ├── MyEndpointWithEJB.java │ │ └── MySessionBean.java │ └── webapp │ ├── WEB-INF │ └── beans.xml │ ├── index.jsp │ └── websocket.js ├── javase-client ├── nbactions.xml ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── javaee7 │ └── websocket │ └── javase │ └── client │ ├── Client.java │ └── MyClientEndpoint.java ├── messagesize ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── messagesize │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── parameters ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── parameters │ │ └── GreetingBean.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── pom.xml ├── properties ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── properties │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── subprotocol ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── subprotocol │ │ └── MyEndpoint.java │ └── webapp │ ├── index.jsp │ └── websocket.js ├── websocket-client-config ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── client │ │ └── configuration │ │ ├── MyClient.java │ │ ├── MyConfigurator.java │ │ ├── MyEndpoint.java │ │ └── TestClient.java │ └── webapp │ └── index.jsp ├── websocket-client-programmatic-config ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── client │ │ └── programmatic │ │ └── configuration │ │ ├── MyClient.java │ │ ├── MyConfigurator.java │ │ ├── MyEndpoint.java │ │ └── TestClient.java │ └── webapp │ └── index.jsp ├── websocket-client-programmatic-encoders ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── client │ │ └── programmatic │ │ └── encoders │ │ ├── MyClient.java │ │ ├── MyEndpoint.java │ │ ├── MyMessage.java │ │ ├── MyMessageDecoder.java │ │ ├── MyMessageEncoder.java │ │ └── TestClient.java │ └── webapp │ └── index.jsp ├── websocket-client-programmatic ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── client │ │ └── programmatic │ │ ├── MyClient.java │ │ ├── MyEndpoint.java │ │ └── TestClient.java │ └── webapp │ └── index.jsp ├── websocket-client ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── client │ │ ├── MyClient.java │ │ ├── MyEndpoint.java │ │ ├── TestLocalClient.java │ │ └── TestRemoteClient.java │ └── webapp │ └── index.jsp ├── websocket-vs-rest-payload ├── payloads.pcapng ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── websocket │ │ └── vs │ │ └── rest │ │ └── payload │ │ ├── ApplicationConfig.java │ │ ├── MyRestEndpoint.java │ │ └── MyWebSocketEndpoint.java │ └── webapp │ └── index.jsp ├── websocket-vs-rest ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── javaee7 │ │ └── websocket │ │ └── websocket │ │ └── vs │ │ └── rest │ │ ├── ApplicationConfig.java │ │ ├── MyRestEndpoint.java │ │ └── MyWebSocketEndpoint.java │ └── webapp │ ├── index.jsp │ ├── rest.js │ ├── stylesheet.css │ └── websocket.js └── whiteboard ├── pom.xml └── src └── main ├── java └── org │ └── javaee7 │ └── websocket │ └── whiteboard │ ├── Coordinates.java │ ├── Figure.java │ ├── FigureDecoder.java │ ├── FigureEncoder.java │ └── Whiteboard.java └── webapp ├── index.jsp ├── websocket.js └── whiteboard.js /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos/wildfly 2 | ADD jaxrs/jaxrs-client/target/jaxrs-client.war /opt/wildfly/standalone/deployments/ 3 | -------------------------------------------------------------------------------- /batch/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: Batch # 2 | 3 | The [JSR 352](https://jcp.org/en/jsr/detail?id=352) specifies a programming model for batch applications and a runtime for scheduling and executing jobs. 4 | 5 | ## Samples ## 6 | 7 | - batchlet-simple 8 | - chunk-checkpoint 9 | - chunk-csv-database 10 | - chunk-exception 11 | - chunk-mapper 12 | - chunk-optional-processor 13 | - chunk-partition 14 | - chunk-simple 15 | - decision 16 | - flow 17 | - batch-listeners 18 | - multiple-steps 19 | - split 20 | - chunk-simple-nobeans 21 | - scheduling 22 | 23 | ## How to run 24 | 25 | More information on how to run can be found at: 26 | 27 | 28 | -------------------------------------------------------------------------------- /batch/batch-listeners/src/main/java/org/javaee7/batch/batch/listeners/BatchListenerRecorder.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.batch.listeners; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | 5 | /** 6 | * @author Roberto Cortez 7 | */ 8 | public class BatchListenerRecorder { 9 | public static CountDownLatch batchListenersCountDownLatch = new CountDownLatch(60); 10 | } 11 | -------------------------------------------------------------------------------- /batch/chunk-csv-database/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE CHUNK_CSV_DATABASE ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "HIREDATE" VARCHAR(50) not null) -------------------------------------------------------------------------------- /batch/chunk-csv-database/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE CHUNK_CSV_DATABASE -------------------------------------------------------------------------------- /batch/chunk-csv-database/src/main/resources/META-INF/mydata.csv: -------------------------------------------------------------------------------- 1 | Penny, 12/1/12 2 | Leonard Hofstadter, 12/6/08 3 | Howard Wolowitz, 8/27/7 4 | Bernadette Rostenkowski-Wolowitz, 8/14/13 5 | Sheldon Cooper, 3/18/9 6 | Amy Farah Fowler, 11/22/10 7 | Raj Koothrappali, 3/2/11 -------------------------------------------------------------------------------- /batch/chunk-exception/src/main/java/org/javaee7/batch/chunk/exception/ChunkExceptionRecorder.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.chunk.exception; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | 5 | /** 6 | * @author Roberto Cortez 7 | */ 8 | public class ChunkExceptionRecorder { 9 | public static CountDownLatch chunkExceptionsCountDownLatch = new CountDownLatch(3); 10 | public static int retryReadExecutions = 0; 11 | } 12 | -------------------------------------------------------------------------------- /batch/chunk-exception/src/main/java/org/javaee7/batch/chunk/exception/MyRetryProcessorListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.chunk.exception; 2 | 3 | import javax.batch.api.chunk.listener.RetryProcessListener; 4 | import javax.inject.Named; 5 | 6 | /** 7 | * @author Roberto Cortez 8 | */ 9 | @Named 10 | public class MyRetryProcessorListener implements RetryProcessListener { 11 | @Override 12 | public void onRetryProcessException(Object item, Exception ex) throws Exception { 13 | System.out.println("MyRetryProcessorListener.onRetryProcessException"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /batch/chunk-exception/src/main/java/org/javaee7/batch/chunk/exception/MyRetryReadListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.chunk.exception; 2 | 3 | import javax.batch.api.chunk.listener.RetryReadListener; 4 | import javax.inject.Named; 5 | 6 | /** 7 | * @author Roberto Cortez 8 | */ 9 | @Named 10 | public class MyRetryReadListener implements RetryReadListener { 11 | @Override 12 | public void onRetryReadException(Exception ex) throws Exception { 13 | ChunkExceptionRecorder.retryReadExecutions++; 14 | ChunkExceptionRecorder.chunkExceptionsCountDownLatch.countDown(); 15 | System.out.println("MyRetryReadListener.onRetryReadException " + ex.getMessage()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /batch/chunk-exception/src/main/java/org/javaee7/batch/chunk/exception/MyRetryWriteListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.chunk.exception; 2 | 3 | import javax.batch.api.chunk.listener.RetryWriteListener; 4 | import javax.inject.Named; 5 | import java.util.List; 6 | 7 | /** 8 | * @author Roberto Cortez 9 | */ 10 | @Named 11 | public class MyRetryWriteListener implements RetryWriteListener { 12 | @Override 13 | public void onRetryWriteException(List items, Exception ex) throws Exception { 14 | System.out.println("MyRetryWriteListener.onRetryWriteException"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /batch/decision/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | batch 7 | 1.0-SNAPSHOT 8 | 9 | 10 | batch-decision 11 | war 12 | Java EE 7 Sample: batch - decision 13 | Batch DSL - Decision 14 | 15 | 16 | -------------------------------------------------------------------------------- /batch/flow/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | batch 7 | 1.0-SNAPSHOT 8 | 9 | 10 | batch-flow 11 | war 12 | Java EE 7 Sample: batch - flow 13 | Batch DSL - Flow 14 | 15 | 16 | -------------------------------------------------------------------------------- /batch/scheduling/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | batch 7 | 1.0-SNAPSHOT 8 | 9 | 10 | batch-scheduling 11 | war 12 | Java EE 7 Sample: batch - scheduling 13 | 14 | Scheduling a Batch Job 15 | 16 | 17 | -------------------------------------------------------------------------------- /batch/scheduling/src/main/java/org/javaee7/batch/samples/scheduling/MyBatchlet.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import static javax.batch.runtime.BatchStatus.COMPLETED; 4 | 5 | import javax.batch.api.AbstractBatchlet; 6 | import javax.inject.Named; 7 | 8 | /** 9 | * @author Roberto Cortez 10 | */ 11 | @Named 12 | public class MyBatchlet extends AbstractBatchlet { 13 | 14 | @Override 15 | public String process() { 16 | System.out.println("Running inside a batchlet"); 17 | 18 | return COMPLETED.toString(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /batch/scheduling/src/main/java/org/javaee7/batch/samples/scheduling/MyJob.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import javax.batch.runtime.BatchRuntime; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import java.util.Properties; 7 | 8 | /** 9 | * @author arungupta 10 | */ 11 | public class MyJob implements Runnable { 12 | 13 | public static List executedBatchs = new ArrayList<>(); 14 | 15 | public void run() { 16 | executedBatchs.add(BatchRuntime.getJobOperator().start("myJob", new Properties())); 17 | afterRun(); 18 | } 19 | 20 | protected void afterRun() { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /batch/scheduling/src/main/java/org/javaee7/batch/samples/scheduling/MyManagedScheduledBatch.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | /** 4 | * @author Roberto Cortez 5 | */ 6 | public interface MyManagedScheduledBatch { 7 | void runJob(); 8 | } 9 | -------------------------------------------------------------------------------- /batch/scheduling/src/main/java/org/javaee7/batch/samples/scheduling/MyTimerScheduleBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import javax.ejb.Singleton; 4 | import javax.ejb.Startup; 5 | 6 | /** 7 | * @author arungupta 8 | */ 9 | @Startup 10 | @Singleton 11 | public class MyTimerScheduleBean extends AbstractTimerBatch { 12 | } 13 | -------------------------------------------------------------------------------- /batch/scheduling/src/main/resources/META-INF/batch-jobs/myJob.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /batch/scheduling/src/test/java/org/javaee7/batch/samples/scheduling/MyJobAlternative.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | /** 4 | * @author Roberto Cortez 5 | */ 6 | public class MyJobAlternative extends MyJob { 7 | 8 | @Override 9 | protected void afterRun() { 10 | System.out.println("Job submitted"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /batch/scheduling/src/test/java/org/javaee7/batch/samples/scheduling/MyManagedScheduledBatchAlternative.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import javax.ejb.Local; 4 | import javax.ejb.Stateless; 5 | import javax.enterprise.inject.Alternative; 6 | 7 | /** 8 | * @author Roberto Cortez 9 | */ 10 | @Alternative 11 | @Stateless 12 | @Local(MyManagedScheduledBatch.class) 13 | public class MyManagedScheduledBatchAlternative extends MyManagedScheduledBatchBean { 14 | 15 | @Override 16 | protected MyJob createJob() { 17 | return new MyJobAlternative(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /batch/scheduling/src/test/java/org/javaee7/batch/samples/scheduling/MyStepListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | 5 | import javax.batch.api.listener.AbstractStepListener; 6 | import javax.inject.Named; 7 | 8 | @Named 9 | public class MyStepListener extends AbstractStepListener { 10 | 11 | public static CountDownLatch countDownLatch = new CountDownLatch(3); 12 | 13 | @Override 14 | public void beforeStep() throws Exception { 15 | } 16 | 17 | @Override 18 | public void afterStep() throws Exception { 19 | countDownLatch.countDown(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /batch/scheduling/src/test/java/org/javaee7/batch/samples/scheduling/MyTimerScheduleAlternative.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.batch.samples.scheduling; 2 | 3 | import javax.ejb.Schedule; 4 | import javax.ejb.Singleton; 5 | import javax.ejb.Startup; 6 | 7 | /** 8 | * @author Roberto Cortez 9 | */ 10 | @Startup 11 | @Singleton 12 | public class MyTimerScheduleAlternative extends AbstractTimerBatch { 13 | 14 | @Override 15 | @Schedule(hour = "*", minute = "*", second = "*/10", persistent = false) 16 | public void myJob() { 17 | super.myJob(); 18 | } 19 | 20 | @Override 21 | protected void afterRun() { 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /batch/split/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | batch 7 | 1.0-SNAPSHOT 8 | 9 | 10 | batch-split 11 | war 12 | Java EE 7 Sample: batch - split 13 | Batch JSL - Splitting Steps 14 | 15 | 16 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-alternatives-priority 12 | Java EE 7 Sample: cdi - alternatives-priority 13 | 14 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/main/java/org/javaee7/cdi/alternatives/priority/FancyGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.alternatives.priority; 2 | 3 | import javax.annotation.Priority; 4 | import javax.enterprise.inject.Alternative; 5 | 6 | /** 7 | * @author Arun Gupta 8 | * @author Radim Hanus 9 | */ 10 | @Priority(1000) 11 | @Alternative 12 | public class FancyGreeting implements Greeting { 13 | @Override 14 | public String greet(String name) { 15 | return "Nice to meet you, hello" + name; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/main/java/org/javaee7/cdi/alternatives/priority/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.alternatives.priority; 2 | 3 | /** 4 | * @author Arun Gupta 5 | * @author Radim Hanus 6 | */ 7 | public interface Greeting { 8 | public String greet(String name); 9 | } 10 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/main/java/org/javaee7/cdi/alternatives/priority/PriorityGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.alternatives.priority; 2 | 3 | import javax.annotation.Priority; 4 | import javax.enterprise.inject.Alternative; 5 | 6 | /** 7 | * @author Radim Hanus 8 | */ 9 | @Priority(2000) 10 | @Alternative 11 | public class PriorityGreeting implements Greeting { 12 | @Override 13 | public String greet(String name) { 14 | return "Hey " + name + " I should be selected since I've got the highest priority !"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/main/java/org/javaee7/cdi/alternatives/priority/ProducerMethodGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.alternatives.priority; 2 | 3 | import javax.annotation.Priority; 4 | import javax.enterprise.inject.Alternative; 5 | import javax.enterprise.inject.Produces; 6 | 7 | /** 8 | * @author Radim Hanus 9 | */ 10 | @Priority(3000) 11 | public class ProducerMethodGreeting { 12 | 13 | @Produces 14 | @Alternative 15 | public Greeting getGreeting() { 16 | return new SimpleGreeting(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/main/java/org/javaee7/cdi/alternatives/priority/SimpleGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.alternatives.priority; 2 | 3 | import javax.enterprise.inject.Alternative; 4 | 5 | /** 6 | * @author Arun Gupta 7 | * @author Radim Hanus 8 | */ 9 | @Alternative 10 | public class SimpleGreeting implements Greeting { 11 | @Override 12 | public String greet(String name) { 13 | return "Hello " + name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/test/resources/beans-alternatives.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | org.javaee7.cdi.alternatives.priority.SimpleGreeting 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /cdi/alternatives-priority/src/test/resources/beans-empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cdi/alternatives/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-alternatives 12 | Java EE 7 Sample: cdi - alternatives 13 | 14 | -------------------------------------------------------------------------------- /cdi/bean-discovery-annotated/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /cdi/bean-discovery-none/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /cdi/beanmanager/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | org.javaee7 9 | cdi 10 | 1.0-SNAPSHOT 11 | 12 | cdi-beanmanager 13 | Java EE 7 Sample: cdi - beanmanager 14 | 15 | 16 | -------------------------------------------------------------------------------- /cdi/beanmanager/src/main/java/org/javaee7/cdi/beanmanager/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.beanmanager; 2 | 3 | /** 4 | * @author Arun Gupta 5 | */ 6 | public interface Greeting { 7 | public String greet(String name); 8 | } 9 | -------------------------------------------------------------------------------- /cdi/beanmanager/src/main/java/org/javaee7/cdi/beanmanager/SimpleGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.beanmanager; 2 | 3 | /** 4 | * @author Arun Gupta 5 | */ 6 | public class SimpleGreeting implements Greeting { 7 | 8 | @Override 9 | public String greet(String name) { 10 | return "Hello " + name; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /cdi/beanmanager/src/main/java/org/javaee7/cdi/beanmanager/SmileyGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.beanmanager; 2 | 3 | /** 4 | * @author Arun Gupta 5 | */ 6 | public class SmileyGreeting extends SimpleGreeting { 7 | 8 | @Override 9 | public String greet(String name) { 10 | return super.greet(name) + " :-)"; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /cdi/beanmanager/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cdi/beansxml-noversion/src/main/java/org/javaee7/cdi/beansxml/noversion/AnnotatedBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.beansxml.noversion; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | 5 | /** 6 | * @author Alexis Hassler 7 | */ 8 | @RequestScoped 9 | public class AnnotatedBean { 10 | public String sayHello(String name) { 11 | return "Hello " + name; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /cdi/beansxml-noversion/src/main/java/org/javaee7/cdi/beansxml/noversion/NotAnnotatedBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.beansxml.noversion; 2 | 3 | /** 4 | * @author Alexis Hassler 5 | */ 6 | public class NotAnnotatedBean { 7 | public String sayHello(String name) { 8 | return "Hello " + name; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /cdi/beansxml-noversion/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /cdi/decorators-builtin-beans/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | cdi 7 | 1.0-SNAPSHOT 8 | 9 | 10 | cdi-decorators-builtin-beans 11 | war 12 | Java EE 7 Sample: cdi - decorators - built-in beans 13 | 14 | -------------------------------------------------------------------------------- /cdi/decorators-priority/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | cdi 7 | 1.0-SNAPSHOT 8 | 9 | 10 | cdi-decorators-priority 11 | war 12 | Java EE 7 Sample: cdi - decorators priority 13 | 14 | -------------------------------------------------------------------------------- /cdi/decorators/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | cdi 7 | 1.0-SNAPSHOT 8 | 9 | 10 | cdi-decorators 11 | war 12 | Java EE 7 Sample: cdi - decorators 13 | 14 | -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | cdi 7 | 1.0-SNAPSHOT 8 | 9 | 10 | dynamic-interceptor 11 | Java EE 7 sample: cdi - dynamic interceptor 12 | 13 | -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/src/main/java/org/javaee7/cdi/dynamic/interceptor/MyBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.dynamic.interceptor; 2 | 3 | import org.javaee7.cdi.dynamic.interceptor.extension.Hello; 4 | 5 | /** 6 | * 7 | * @author Arjan Tijms 8 | * 9 | */ 10 | public class MyBean { 11 | 12 | @Hello 13 | public String getName() { 14 | return "John"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/src/main/java/org/javaee7/cdi/dynamic/interceptor/extension/Hello.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.dynamic.interceptor.extension; 2 | 3 | import static java.lang.annotation.ElementType.METHOD; 4 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 5 | 6 | import java.lang.annotation.Inherited; 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.Target; 9 | 10 | import javax.interceptor.InterceptorBinding; 11 | 12 | 13 | @Inherited 14 | @InterceptorBinding 15 | @Retention(RUNTIME) 16 | @Target(METHOD) 17 | public @interface Hello { 18 | } -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/src/main/java/org/javaee7/cdi/dynamic/interceptor/extension/HelloInterceptorEnabler.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.dynamic.interceptor.extension; 2 | 3 | import javax.annotation.Priority; 4 | import javax.interceptor.Interceptor; 5 | 6 | /** 7 | * Class used to enable (activate) the dynamic interceptor and sets its priority 8 | * 9 | * @author Arjan Tijms 10 | * 11 | */ 12 | @Interceptor 13 | @Priority(200) 14 | public class HelloInterceptorEnabler { 15 | 16 | } -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension: -------------------------------------------------------------------------------- 1 | org.javaee7.cdi.dynamic.interceptor.extension.CdiExtension -------------------------------------------------------------------------------- /cdi/dynamic-interceptor/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cdi/events-conditional-reception/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-events-conditional-reception 12 | Java EE 7 Sample: cdi - events-conditional-reception 13 | 14 | -------------------------------------------------------------------------------- /cdi/events-conditional-reception/src/main/java/org/javaee7/cdi/events/conditional/EventReceiver.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events.conditional; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface EventReceiver { 7 | String getGreet(); 8 | } 9 | -------------------------------------------------------------------------------- /cdi/events-conditional-reception/src/main/java/org/javaee7/cdi/events/conditional/EventSender.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events.conditional; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface EventSender { 7 | void send(String message); 8 | } 9 | -------------------------------------------------------------------------------- /cdi/events-conditional-reception/src/main/java/org/javaee7/cdi/events/conditional/GreetingReceiver.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events.conditional; 2 | 3 | import javax.enterprise.context.SessionScoped; 4 | import javax.enterprise.event.Observes; 5 | import javax.enterprise.event.Reception; 6 | import java.io.Serializable; 7 | 8 | /** 9 | * @author Radim Hanus 10 | */ 11 | @SessionScoped 12 | public class GreetingReceiver implements EventReceiver, Serializable { 13 | private String greet = "Willkommen"; 14 | 15 | void receive(@Observes(notifyObserver = Reception.IF_EXISTS) String greet) { 16 | this.greet = greet; 17 | } 18 | 19 | @Override 20 | public String getGreet() { 21 | return greet; 22 | } 23 | } -------------------------------------------------------------------------------- /cdi/events-conditional-reception/src/main/java/org/javaee7/cdi/events/conditional/GreetingSender.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events.conditional; 2 | 3 | import javax.enterprise.event.Event; 4 | import javax.inject.Inject; 5 | 6 | /** 7 | * @author Radim Hanus 8 | */ 9 | public class GreetingSender implements EventSender { 10 | @Inject 11 | private Event event; 12 | 13 | @Override 14 | public void send(String message) { 15 | event.fire(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cdi/events-conditional-reception/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cdi/events/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-events 12 | Java EE 7 Sample: cdi - events 13 | 14 | -------------------------------------------------------------------------------- /cdi/events/src/main/java/org/javaee7/cdi/events/EventReceiver.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface EventReceiver { 7 | String getGreet(); 8 | } 9 | -------------------------------------------------------------------------------- /cdi/events/src/main/java/org/javaee7/cdi/events/EventSender.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface EventSender { 7 | void send(String message); 8 | } 9 | -------------------------------------------------------------------------------- /cdi/events/src/main/java/org/javaee7/cdi/events/GreetingReceiver.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events; 2 | 3 | import javax.enterprise.context.SessionScoped; 4 | import javax.enterprise.event.Observes; 5 | import java.io.Serializable; 6 | 7 | /** 8 | * @author Radim Hanus 9 | */ 10 | @SessionScoped 11 | public class GreetingReceiver implements EventReceiver, Serializable { 12 | private String greet = "Willkommen"; 13 | 14 | void receive(@Observes String greet) { 15 | this.greet = greet; 16 | } 17 | 18 | @Override 19 | public String getGreet() { 20 | return greet; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /cdi/events/src/main/java/org/javaee7/cdi/events/GreetingSender.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.events; 2 | 3 | import javax.enterprise.event.Event; 4 | import javax.inject.Inject; 5 | 6 | /** 7 | * @author Radim Hanus 8 | */ 9 | public class GreetingSender implements EventSender { 10 | @Inject 11 | private Event event; 12 | 13 | @Override 14 | public void send(String message) { 15 | event.fire(message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cdi/events/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cdi/extension-impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension: -------------------------------------------------------------------------------- 1 | org.javaee7.cdi.extension.impl.MyExtension -------------------------------------------------------------------------------- /cdi/extension/src/main/webapp/WEB-INF/lib/extension-impl-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/cdi/extension/src/main/webapp/WEB-INF/lib/extension-impl-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /cdi/instance-qualifiers/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | cdi 9 | org.javaee7 10 | 1.0-SNAPSHOT 11 | ../pom.xml 12 | 13 | 14 | cdi-instance-qualifiers 15 | Java EE 7 Sample: cdi - instance-qualifiers 16 | 17 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/main/java/org/javaee7/cdi/instance/Business.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | import javax.inject.Qualifier; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.Target; 6 | 7 | import static java.lang.annotation.ElementType.*; 8 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 9 | 10 | /** 11 | * @author Radim Hanus 12 | */ 13 | @Qualifier 14 | @Retention(RUNTIME) 15 | @Target({TYPE, METHOD, FIELD, PARAMETER}) 16 | public @interface Business { 17 | } 18 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/main/java/org/javaee7/cdi/instance/FormalGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | @Business 7 | public class FormalGreeting implements Greeting { 8 | @Override 9 | public String greet(String name) { 10 | return "Good morning " + name; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/main/java/org/javaee7/cdi/instance/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | /** 4 | * @author Arun Gupta 5 | * @author Radim Hanus 6 | */ 7 | public interface Greeting { 8 | String greet(String name); 9 | } 10 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/main/java/org/javaee7/cdi/instance/Personal.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | import javax.inject.Qualifier; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.Target; 6 | 7 | import static java.lang.annotation.ElementType.*; 8 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 9 | 10 | /** 11 | * @author Radim Hanus 12 | */ 13 | @Qualifier 14 | @Retention(RUNTIME) 15 | @Target({TYPE, METHOD, FIELD, PARAMETER}) 16 | public @interface Personal { 17 | } 18 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/main/java/org/javaee7/cdi/instance/SimpleGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | /** 4 | * @author Arun Gupta 5 | * @author Radim Hanus 6 | */ 7 | public class SimpleGreeting implements Greeting { 8 | @Override 9 | public String greet(String name) { 10 | return "Hello " + name; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /cdi/instance-qualifiers/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cdi/instance/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | cdi 9 | org.javaee7 10 | 1.0-SNAPSHOT 11 | 12 | 13 | cdi-instance 14 | Java EE 7 Sample: cdi - instance 15 | 16 | -------------------------------------------------------------------------------- /cdi/instance/src/main/java/org/javaee7/cdi/instance/FancyGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | 5 | /** 6 | * @author Arun Gupta 7 | * @author Radim Hanus 8 | */ 9 | @RequestScoped 10 | public class FancyGreeting implements Greeting { 11 | @Override 12 | public String greet(String name) { 13 | return "Nice to meet you, hello" + name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cdi/instance/src/main/java/org/javaee7/cdi/instance/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | /** 4 | * @author Arun Gupta 5 | * @author Radim Hanus 6 | */ 7 | public interface Greeting { 8 | String greet(String name); 9 | } 10 | -------------------------------------------------------------------------------- /cdi/instance/src/main/java/org/javaee7/cdi/instance/SimpleGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.instance; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | 5 | /** 6 | * @author Arun Gupta 7 | * @author Radim Hanus 8 | */ 9 | @RequestScoped 10 | public class SimpleGreeting implements Greeting { 11 | @Override 12 | public String greet(String name) { 13 | return "Hello " + name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cdi/instance/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /cdi/interceptors-priority/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-interceptors-priority 12 | Java EE 7 Sample: cdi - interceptors-priority 13 | 14 | -------------------------------------------------------------------------------- /cdi/interceptors-priority/src/main/java/org/javaee7/cdi/interceptors/priority/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.interceptors.priority; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface Greeting { 7 | public String getGreet(); 8 | 9 | public void setGreet(String name); 10 | } 11 | -------------------------------------------------------------------------------- /cdi/interceptors-priority/src/main/java/org/javaee7/cdi/interceptors/priority/MyInterceptorBinding.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.interceptors.priority; 2 | 3 | import javax.interceptor.InterceptorBinding; 4 | import java.lang.annotation.Inherited; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.Target; 7 | 8 | import static java.lang.annotation.ElementType.METHOD; 9 | import static java.lang.annotation.ElementType.TYPE; 10 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 11 | 12 | /** 13 | * @author Arun Gupta 14 | */ 15 | @Inherited 16 | @InterceptorBinding 17 | @Retention(RUNTIME) 18 | @Target({ METHOD, TYPE }) 19 | public @interface MyInterceptorBinding { 20 | } 21 | -------------------------------------------------------------------------------- /cdi/interceptors-priority/src/main/java/org/javaee7/cdi/interceptors/priority/SimpleGreeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.interceptors.priority; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | @MyInterceptorBinding 7 | public class SimpleGreeting implements Greeting { 8 | private String greet; 9 | 10 | public String getGreet() { 11 | return greet; 12 | } 13 | 14 | public void setGreet(String greet) { 15 | this.greet = greet; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cdi/interceptors-priority/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cdi/interceptors/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-interceptors 12 | Java EE 7 Sample: cdi - interceptors 13 | 14 | -------------------------------------------------------------------------------- /cdi/interceptors/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | org.javaee7.cdi.interceptors.MyInterceptor 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection-flowscoped/src/main/java/org/javaee7/cdi/nobeans/el/injection/flowscoped/FlowScopedBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.nobeans.el.injection.flowscoped; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | import javax.inject.Named; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @Named 10 | @RequestScoped 11 | public class FlowScopedBean { 12 | public String sayHello() { 13 | return "Hello there!"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection-flowscoped/src/main/webapp/myflow/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Flow Scoped Page 7 | 8 | 9 |

Flow Scoped Page

10 | #{flowScopedBean.sayHello()} 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection-flowscoped/src/main/webapp/myflow/myflow-flow.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | cdi 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | cdi-nobeans-el-injection 12 | war 13 | Java EE 7 Sample: cdi - nobeans-el-injection 14 | 15 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection/src/main/java/org/javaee7/cdi/nobeans/el/injection/ScopedBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.cdi.nobeans.el.injection; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | import javax.inject.Named; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @Named 10 | @RequestScoped 11 | public class ScopedBean { 12 | public String sayHello() { 13 | return "Hello there!"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cdi/nobeans-el-injection/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Facelet Title 7 | 8 | 9 | #{scopedBean.sayHello()} 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /cdi/vetoed/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 4.0.0 7 | 8 | 9 | org.javaee7 10 | cdi 11 | 1.0-SNAPSHOT 12 | 13 | 14 | cdi-vetoed 15 | Java EE 7 Sample: cdi - vetoed 16 | 17 | 18 | -------------------------------------------------------------------------------- /concurrency/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: Concurrency Utilities # 2 | 3 | The [JSR 236](https://jcp.org/en/jsr/detail?id=236) provides a simple, standardized API for using concurrency from application components without compromising container integrity while still preserving the Java EE platform's fundamental benefits. 4 | 5 | ## Samples ## 6 | 7 | - dynamicproxy 8 | - managedexecutor 9 | - managedscheduledexecutor 10 | - managedthreadfactory 11 | 12 | ## How to run 13 | 14 | More information on how to run can be found at: 15 | 16 | 17 | -------------------------------------------------------------------------------- /concurrency/managedexecutor/src/main/java/org/javaee7/concurrency/managedexecutor/MyTransactionScopedBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.concurrency.managedexecutor; 2 | 3 | import java.io.Serializable; 4 | 5 | /** 6 | * @author Arun Gupta 7 | */ 8 | @javax.transaction.TransactionScoped 9 | public class MyTransactionScopedBean implements Serializable { 10 | 11 | private static final long serialVersionUID = 1L; 12 | 13 | public boolean isInTx() { 14 | return true; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /concurrency/managedexecutor/src/main/java/org/javaee7/concurrency/managedexecutor/TestStatus.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.concurrency.managedexecutor; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | 5 | /** 6 | * @author Arun Gupta 7 | */ 8 | public class TestStatus { 9 | public static CountDownLatch latch; 10 | public static boolean foundTransactionScopedBean; 11 | } 12 | -------------------------------------------------------------------------------- /concurrency/managedexecutor/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | concurrent/myExecutor 9 | 10 | 11 | javax.enterprise.concurrent.ManagedExecutorService 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ejb/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: EJB 3.2 # 2 | 3 | The [JSR 345](https://jcp.org/en/jsr/detail?id=345) is an architecture for the development and deployment of component-based business applications. 4 | 5 | ## Samples ## 6 | 7 | - embeddable 8 | - lifecycle 9 | - remote 10 | - singleton 11 | - stateful 12 | - stateless 13 | - timer 14 | - async-ejb 15 | 16 | 17 | ## How to run 18 | 19 | More information on how to run can be found at: 20 | 21 | 22 | -------------------------------------------------------------------------------- /ejb/async-ejb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | ejb 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | ejb-async-ejb 12 | war 13 | Java EE 7 Sample: ejb - async-ejb 14 | 15 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed-ssl/src/main/java/org/javaee7/ejb/remote/ssl/Bean.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.ejb.remote.ssl; 3 | 4 | import java.io.Serializable; 5 | 6 | import javax.annotation.security.RolesAllowed; 7 | import javax.ejb.Stateless; 8 | 9 | @Stateless 10 | public class Bean implements BeanRemote, Serializable { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | @Override 15 | @RolesAllowed("g1") 16 | public String method() { 17 | return "method"; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed-ssl/src/main/java/org/javaee7/ejb/remote/ssl/BeanRemote.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.ejb.remote.ssl; 3 | 4 | import javax.ejb.Remote; 5 | 6 | @Remote 7 | public interface BeanRemote { 8 | String method(); 9 | } 10 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed-ssl/src/main/resources/META-INF/application.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | myapp 8 | 9 | 10 | myEJB.jar 11 | 12 | 13 | 14 | 15 | test.war 16 | /test 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed-ssl/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /ejb/remote/roles-allowed-ssl/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed/src/main/java/org/javaee7/ejb/remote/remote/Bean.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.ejb.remote.remote; 3 | 4 | import java.io.Serializable; 5 | 6 | import javax.annotation.security.RolesAllowed; 7 | import javax.ejb.Stateless; 8 | 9 | @Stateless 10 | public class Bean implements BeanRemote, Serializable { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | @Override 15 | @RolesAllowed("g1") 16 | public String method() { 17 | return "method"; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed/src/main/java/org/javaee7/ejb/remote/remote/BeanRemote.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.ejb.remote.remote; 3 | 4 | import javax.ejb.Remote; 5 | 6 | @Remote 7 | public interface BeanRemote { 8 | String method(); 9 | } 10 | -------------------------------------------------------------------------------- /ejb/remote/roles-allowed/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /ejb/remote/roles-allowed/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /ejb/remote/vendor/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: EJB - Remote - Vendor # 2 | 3 | This module contains vendor specific implementations to obtain the JNDI context from where remote EJB beans can be requested 4 | from with a username/password credential. 5 | 6 | ## Implementations ## 7 | 8 | - payara-glassfish - An implementation that works for both Payara and GlassFish 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ejb/remote/vendor/payara-glassfish/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: EJB - Remote - Vendor - Payara and GlassFish # 2 | 3 | This modules contains a class that returns a JNDI context suitable for remote lookups against the default URL 4 | for a remote Payara or GlassFish server (localhost). It sets the provided credentials 5 | in a Payara/GlassFish specific way and puts the required client jar on the classpath. 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ejb/remote/vendor/payara-glassfish/src/main/resources/META-INF/services/org.javaee7.RemoteEJBContextProvider: -------------------------------------------------------------------------------- 1 | org.javaee7.PayaraEJBContextProvider -------------------------------------------------------------------------------- /ejb/stateful/src/main/java/org/javaee7/ejb/stateful/ReentrantStatefulBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.ejb.stateful; 2 | 3 | import javax.annotation.Resource; 4 | import javax.ejb.SessionContext; 5 | import javax.ejb.Stateful; 6 | 7 | /** 8 | * 9 | * @author Arjan Tijms 10 | * 11 | */ 12 | @Stateful 13 | public class ReentrantStatefulBean { 14 | 15 | @Resource 16 | private SessionContext sessionConext; 17 | 18 | public void initialMethod() { 19 | sessionConext.getBusinessObject(ReentrantStatefulBean.class).reentrantMehthod(); 20 | } 21 | 22 | public void reentrantMehthod() { 23 | 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /ejb/timer/src/main/java/org/javaee7/ejb/timer/Ping.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.ejb.timer; 2 | 3 | public class Ping { 4 | 5 | private String timeInfo; 6 | private long time = System.currentTimeMillis(); 7 | 8 | public Ping(String s) { 9 | this.timeInfo = s; 10 | } 11 | 12 | public long getTime() { 13 | return time; 14 | } 15 | 16 | public String getTimeInfo() { 17 | return timeInfo; 18 | } 19 | 20 | @Override 21 | public String toString() { 22 | return "Ping {" + 23 | "timeInfo='" + timeInfo + '\'' + 24 | ", time=" + time + 25 | '}'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ejb/timer/src/main/java/org/javaee7/ejb/timer/PingsListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.ejb.timer; 2 | 3 | import javax.ejb.Singleton; 4 | import javax.ejb.Startup; 5 | import javax.enterprise.event.Observes; 6 | import java.util.List; 7 | import java.util.concurrent.CopyOnWriteArrayList; 8 | 9 | @Startup 10 | @Singleton 11 | public class PingsListener { 12 | 13 | final List pings = new CopyOnWriteArrayList<>(); 14 | 15 | public void listen(@Observes Ping ping) { 16 | System.out.println("ping = " + ping); 17 | pings.add(ping); 18 | } 19 | 20 | public List getPings() { 21 | return pings; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ejb/timer/src/main/webapp/WEB-INF/jboss-deployment-structure.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /el/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: EL 3.0 # 2 | 3 | The [JSR 341](https://jcp.org/en/jsr/detail?id=341) is an update to Expression Language 2.2, currently part of JSR 245, JavaServer Page (JSP) 2.2. 4 | 5 | ## Samples ## 6 | 7 | - standalone 8 | 9 | ## How to run 10 | 11 | More information on how to run can be found at: 12 | 13 | 14 | -------------------------------------------------------------------------------- /interceptor/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: Interceptor 1.2 # 2 | 3 | The [JSR 318](https://jcp.org/en/jsr/detail?id=318) specifies Interceptors 1.2. Since this is a maintenance release on top of 1.1 the JSR number still remained the same as EJB 3.1 (JSR 318). 4 | 5 | ## Samples ## 6 | 7 | - around-construct 8 | 9 | ## How to run 10 | 11 | More information on how to run can be found at: 12 | 13 | 14 | -------------------------------------------------------------------------------- /interceptor/around-construct/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | interceptor 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | interceptor-around-construct 12 | Java EE 7 Sample: interceptor - around-construct 13 | 14 | -------------------------------------------------------------------------------- /interceptor/around-construct/src/main/java/org/javaee7/interceptor/aroundconstruct/Greeting.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.interceptor.aroundconstruct; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface Greeting { 7 | boolean isConstructed(); 8 | 9 | boolean isInitialized(); 10 | 11 | Param getParam(); 12 | } 13 | -------------------------------------------------------------------------------- /interceptor/around-construct/src/main/java/org/javaee7/interceptor/aroundconstruct/GreetingParam.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.interceptor.aroundconstruct; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public class GreetingParam implements Param { 7 | private String value; 8 | 9 | public GreetingParam() { 10 | value = "Greeting"; 11 | } 12 | 13 | @Override 14 | public String getValue() { 15 | return value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /interceptor/around-construct/src/main/java/org/javaee7/interceptor/aroundconstruct/MyInterceptorBinding.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.interceptor.aroundconstruct; 2 | 3 | import javax.interceptor.InterceptorBinding; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.Target; 6 | 7 | import static java.lang.annotation.ElementType.METHOD; 8 | import static java.lang.annotation.ElementType.TYPE; 9 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 10 | 11 | /** 12 | * @author Radim Hanus 13 | */ 14 | @InterceptorBinding 15 | @Retention(RUNTIME) 16 | @Target({ METHOD, TYPE }) 17 | public @interface MyInterceptorBinding { 18 | } 19 | -------------------------------------------------------------------------------- /interceptor/around-construct/src/main/java/org/javaee7/interceptor/aroundconstruct/Param.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.interceptor.aroundconstruct; 2 | 3 | /** 4 | * @author Radim Hanus 5 | */ 6 | public interface Param { 7 | String getValue(); 8 | } 9 | -------------------------------------------------------------------------------- /interceptor/around-construct/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | org.javaee7.interceptor.aroundconstruct.MyInterceptor 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jacc/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JACC - Java Authorization Contract for Containers # 2 | 3 | The [JSR 115](https://jcp.org/en/jsr/detail?id=115) seeks to define a contract between containers and authorization service providers that will result in the implementation of providers for use by containers. 4 | 5 | ## Samples ## 6 | 7 | - contexts 8 | 9 | ## How to run 10 | 11 | More information on how to run can be found at: 12 | 13 | 14 | -------------------------------------------------------------------------------- /jacc/contexts/src/main/java/org/javaee7/jacc/contexts/sam/SamAutoRegistrationListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jacc.contexts.sam; 2 | 3 | import javax.servlet.ServletContextEvent; 4 | import javax.servlet.annotation.WebListener; 5 | 6 | import org.javaee7.jaspic.common.BaseServletContextListener; 7 | import org.javaee7.jaspic.common.JaspicUtils; 8 | 9 | /** 10 | * 11 | * @author Arjan Tijms 12 | * 13 | */ 14 | @WebListener 15 | public class SamAutoRegistrationListener extends BaseServletContextListener { 16 | 17 | @Override 18 | public void contextInitialized(ServletContextEvent sce) { 19 | JaspicUtils.registerSAM(sce.getServletContext(), new TestServerAuthModule()); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /jacc/contexts/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jacc/contexts/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JASPIC - Java Authentication Service Provider Interface for Containers# 2 | 3 | The [JSR 196](https://jcp.org/en/jsr/detail?id=196) seeks to define a standard interface by which authentication modules may be integrated with containers and such that these modules may establish the authentication identities used by containers. 4 | 5 | ## Samples ## 6 | 7 | - async-authentication 8 | - basic-authentication 9 | - ejb-propagation 10 | - lifecycle 11 | - register-session 12 | - wrapping 13 | 14 | ## How to run 15 | 16 | More information on how to run can be found at: 17 | 18 | 19 | -------------------------------------------------------------------------------- /jaspic/async-authentication/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/async-authentication/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/async-authentication/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/basic-authentication/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/basic-authentication/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/basic-authentication/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/common/src/main/java/org/javaee7/jaspic/common/BaseServletContextListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.common; 2 | 3 | import javax.servlet.ServletContextEvent; 4 | import javax.servlet.ServletContextListener; 5 | 6 | /** 7 | * 8 | * @author Arjan Tijms 9 | * 10 | */ 11 | public class BaseServletContextListener implements ServletContextListener { 12 | 13 | @Override 14 | public void contextInitialized(ServletContextEvent arg0) { 15 | // NOOP 16 | } 17 | 18 | @Override 19 | public void contextDestroyed(ServletContextEvent arg0) { 20 | // NOOP 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/custom-principal/src/main/java/org/javaee7/jaspic/customprincipal/sam/MyPrincipal.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.customprincipal.sam; 2 | 3 | import java.security.Principal; 4 | 5 | /** 6 | * 7 | * @author Arjan Tijms 8 | * 9 | */ 10 | public class MyPrincipal implements Principal { 11 | 12 | private final String name; 13 | 14 | public MyPrincipal(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/custom-principal/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/custom-principal/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/custom-principal/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/java/org/javaee7/jaspic/dispatching/bean/MyBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.dispatching.bean; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | import javax.inject.Inject; 5 | import javax.inject.Named; 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | @Named 9 | @RequestScoped 10 | public class MyBean { 11 | 12 | @Inject 13 | private HttpServletRequest request; 14 | 15 | public String getText() { 16 | return "Called from CDI\n"; 17 | } 18 | 19 | public String getServletPath() { 20 | return request.getServletPath(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/beans.xml -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/forward-cdi.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Forward with CDI 7 | 8 | 9 | response from JSF forward - #{myBean.text} 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/forward.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Forward 7 | 8 | 9 | response from JSF forward 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/include-cdi.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Include with CDI 7 | 8 | 9 | response from JSF include - #{myBean.text} 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching-jsf-cdi/src/main/webapp/include.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Include 7 | 8 | 9 | response from JSF include 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching/src/main/java/org/javaee7/jaspic/dispatching/sam/SamAutoRegistrationListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.dispatching.sam; 2 | 3 | import javax.servlet.ServletContextEvent; 4 | import javax.servlet.annotation.WebListener; 5 | 6 | import org.javaee7.jaspic.common.BaseServletContextListener; 7 | import org.javaee7.jaspic.common.JaspicUtils; 8 | 9 | /** 10 | * 11 | * @author Arjan Tijms 12 | * 13 | */ 14 | @WebListener 15 | public class SamAutoRegistrationListener extends BaseServletContextListener { 16 | 17 | @Override 18 | public void contextInitialized(ServletContextEvent sce) { 19 | JaspicUtils.registerSAM(sce.getServletContext(), new TestServerAuthModule()); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /jaspic/dispatching/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/dispatching/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/dispatching/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/ejb-propagation/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/ejb-propagation/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/ejb-propagation/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/ejb-register-session/src/main/java/org/javaee7/jaspic/registersession/sam/MyPrincipal.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.registersession.sam; 2 | 3 | import java.security.Principal; 4 | 5 | /** 6 | * 7 | * @author Arjan Tijms 8 | * 9 | */ 10 | public class MyPrincipal implements Principal { 11 | 12 | private final String name; 13 | 14 | public MyPrincipal(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/ejb-register-session/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/ejb-register-session/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/ejb-register-session/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaspitest 4 | 5 | -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/java/org/javaee7/jaspic/invoke/bean/CDIBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.invoke.bean; 2 | 3 | import javax.enterprise.context.RequestScoped; 4 | import javax.inject.Inject; 5 | import javax.inject.Named; 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | @Named 9 | @RequestScoped 10 | public class CDIBean { 11 | 12 | @Inject 13 | private HttpServletRequest request; 14 | 15 | public String getText() { 16 | return "Called from CDI"; 17 | } 18 | 19 | public void setTextViaInjectedRequest() { 20 | request.setAttribute("text", "Called from CDI via injected request"); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/java/org/javaee7/jaspic/invoke/bean/EJBBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.invoke.bean; 2 | 3 | import javax.ejb.Stateless; 4 | 5 | @Stateless 6 | public class EJBBean { 7 | 8 | public String getText() { 9 | return "Called from EJB"; 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/java/org/javaee7/jaspic/invoke/sam/SamAutoRegistrationListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.invoke.sam; 2 | 3 | import javax.servlet.ServletContextEvent; 4 | import javax.servlet.annotation.WebListener; 5 | 6 | import org.javaee7.jaspic.common.BaseServletContextListener; 7 | import org.javaee7.jaspic.common.JaspicUtils; 8 | 9 | /** 10 | * 11 | * @author Arjan Tijms 12 | * 13 | */ 14 | @WebListener 15 | public class SamAutoRegistrationListener extends BaseServletContextListener { 16 | 17 | @Override 18 | public void contextInitialized(ServletContextEvent sce) { 19 | JaspicUtils.registerSAM(sce.getServletContext(), new TestServerAuthModule()); 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jaspic/invoke-ejb-cdi/src/main/webapp/WEB-INF/beans.xml -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/invoke-ejb-cdi/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/jacc-propagation/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/jacc-propagation/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/jacc-propagation/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/lifecycle/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/lifecycle/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/lifecycle/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaspitest 4 | 5 | -------------------------------------------------------------------------------- /jaspic/programmatic-authentication/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/programmatic-authentication/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/programmatic-authentication/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/register-session/src/main/java/org/javaee7/jaspic/registersession/sam/MyPrincipal.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaspic.registersession.sam; 2 | 3 | import java.security.Principal; 4 | 5 | /** 6 | * 7 | * @author Arjan Tijms 8 | * 9 | */ 10 | public class MyPrincipal implements Principal { 11 | 12 | private final String name; 13 | 14 | public MyPrincipal(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String getName() { 20 | return name; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jaspic/register-session/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/register-session/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/register-session/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaspitest 4 | 5 | -------------------------------------------------------------------------------- /jaspic/status-codes/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/status-codes/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/status-codes/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jaspitest 5 | 6 | -------------------------------------------------------------------------------- /jaspic/wrapping/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | architect 7 | architect 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaspic/wrapping/src/main/webapp/WEB-INF/ibm-application-bnd.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaspic/wrapping/src/main/webapp/WEB-INF/jboss-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaspitest 4 | 5 | -------------------------------------------------------------------------------- /javamail/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: Javamail 1.5# 2 | 3 | The [JSR 919](https://jcp.org/en/jsr/detail?id=919) seeks to define a description of the new APIs that are being introduced in JavaMail. 4 | 5 | ## Samples ## 6 | 7 | - definition 8 | 9 | ## How to run 10 | 11 | More information on how to run can be found at: 12 | 13 | 14 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/java/org/javaee7/jaxrpc/endpoint/HelloService.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrpc.endpoint; 2 | 3 | import java.rmi.Remote; 4 | import java.rmi.RemoteException; 5 | 6 | public interface HelloService extends Remote { 7 | String sayHello(String s) throws RemoteException; 8 | } -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/java/org/javaee7/jaxrpc/endpoint/HelloServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrpc.endpoint; 2 | 3 | public class HelloServiceImpl implements HelloService { 4 | 5 | public String sayHello(String input) { 6 | return "Hello " + input; 7 | } 8 | } -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/resources/HelloService.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/resources/META-INF/services/javax.xml.soap.MessageFactory: -------------------------------------------------------------------------------- 1 | com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/resources/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/webapp/WEB-INF/.gitignore: -------------------------------------------------------------------------------- 1 | /mapping.xml 2 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/webapp/WEB-INF/README.md: -------------------------------------------------------------------------------- 1 | Generated file `mapping.xml` will be saved here. -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/webapp/WEB-INF/wsdl/.gitignore: -------------------------------------------------------------------------------- 1 | /MyHelloService.wsdl 2 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-endpoint/src/main/webapp/WEB-INF/wsdl/README.md: -------------------------------------------------------------------------------- 1 | Generated file `MyHelloService.wsdl` will be saved here. -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/java/org/javaee7/jaxrpc/security/HelloService.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | 3 | package org.javaee7.jaxrpc.security; 4 | 5 | import java.rmi.Remote; 6 | import java.rmi.RemoteException; 7 | 8 | /** 9 | * The mandated interface for a JAX-RPC remote web service. 10 | * 11 | *

12 | * Note the mandated extension from the {@link Remote} interface 13 | * and the service method having to throw a {@link RemoteException}. 14 | * 15 | * @author Arjan Tijms 16 | * 17 | */ 18 | public interface HelloService extends Remote { 19 | String sayHello(String input) throws RemoteException; 20 | } -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/java/org/javaee7/jaxrpc/security/HelloServiceImpl.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | 3 | package org.javaee7.jaxrpc.security; 4 | 5 | /** 6 | * Implementation class for the JAX-RPC remote web service. 7 | * 8 | * @author Arjan Tijms 9 | * 10 | */ 11 | public class HelloServiceImpl implements HelloService { 12 | 13 | public String sayHello(String input) { 14 | return "Hello " + input; 15 | } 16 | } -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/webapp/WEB-INF/.gitignore: -------------------------------------------------------------------------------- 1 | /mapping.xml 2 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/webapp/WEB-INF/README.md: -------------------------------------------------------------------------------- 1 | Generated file `mapping.xml` will be saved here. -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/webapp/WEB-INF/wsdl/.gitignore: -------------------------------------------------------------------------------- 1 | /MyHelloService.wsdl 2 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/main/webapp/WEB-INF/wsdl/README.md: -------------------------------------------------------------------------------- 1 | Generated file `MyHelloService.wsdl` will be saved here. -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/test/java/stub/.gitignore: -------------------------------------------------------------------------------- 1 | /HelloService.java 2 | /HelloService_Stub.java 3 | /HelloService_sayHello_RequestStruct.java 4 | /HelloService_sayHello_RequestStruct_SOAPBuilder.java 5 | /HelloService_sayHello_RequestStruct_SOAPSerializer.java 6 | /HelloService_sayHello_ResponseStruct.java 7 | /HelloService_sayHello_ResponseStruct_SOAPBuilder.java 8 | /HelloService_sayHello_ResponseStruct_SOAPSerializer.java 9 | /MyHelloService.java 10 | /MyHelloService_Impl.java 11 | /MyHelloService_SerializerRegistry.java 12 | -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/test/java/stub/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated Client Stubs will appear in this package after the Maven build is executed. 3 | * The test {@link org.javaee7.jaxrpc.security.HelloTest} depends on these stubs. 4 | */ 5 | package stub; -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /jaxrpc/jaxrpc-security/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /jaxrs/beanparam/README.adoc: -------------------------------------------------------------------------------- 1 | = JAX-RS BeanParam 2 | 3 | This example demonstrate the use of a +@BeanParam+ annotation to group some of the request parameters in a user bean, in order to avoid having too many paramaters in the method signature. 4 | 5 | The user type annotated with +@BeanParam+ may contain fields or setter methods annotated with +@MatrixParam+, +@QueryParam+, +@PathParam+, +@CookieParam+ or +@HeaderParam+. -------------------------------------------------------------------------------- /jaxrs/beanparam/src/main/java/org/javaee7/jaxrs/beanparam/MyApplication.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.beanparam; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ApplicationPath("webresources") 10 | public class MyApplication extends Application { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /jaxrs/beanparam/src/main/java/org/javaee7/jaxrs/beanparam/MyPathParams.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.beanparam; 2 | 3 | import javax.ws.rs.PathParam; 4 | 5 | /** 6 | * @author xcoulon 7 | * 8 | */ 9 | public class MyPathParams { 10 | 11 | @PathParam("id1") 12 | private String id1; 13 | 14 | private String id2; 15 | 16 | public String getId1() { 17 | return id1; 18 | } 19 | 20 | public void setId1(String id1) { 21 | this.id1 = id1; 22 | } 23 | 24 | public String getId2() { 25 | return id2; 26 | } 27 | 28 | @PathParam("id2") 29 | public void setId2(String id2) { 30 | this.id2 = id2; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /jaxrs/beanparam/src/main/java/org/javaee7/jaxrs/beanparam/MyQueryParams.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.beanparam; 2 | 3 | import javax.ws.rs.QueryParam; 4 | 5 | /** 6 | * @author xcoulon 7 | * 8 | */ 9 | public class MyQueryParams { 10 | 11 | @QueryParam("param1") 12 | private String param1; 13 | 14 | @QueryParam("param2") 15 | private String param2; 16 | 17 | @QueryParam("param3") 18 | private String param3; 19 | 20 | public String getParam1() { 21 | return param1; 22 | } 23 | 24 | public String getParam2() { 25 | return param2; 26 | } 27 | 28 | public String getParam3() { 29 | return param3; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /jaxrs/client-negotiation/src/main/java/org/javaee7/jaxrs/client/negotiation/People.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.client.negotiation; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlRootElement; 8 | 9 | @XmlRootElement 10 | public class People extends ArrayList { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | @XmlElement(name = "person") 15 | public List getPeople() { 16 | return this; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /jaxrs/db-access/src/main/java/org/javaee7/jaxrs/dbaccess/MyApplication.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.dbaccess; 2 | 3 | import javax.ws.rs.core.Application; 4 | 5 | /** 6 | * @author Arun Gupta 7 | */ 8 | @javax.ws.rs.ApplicationPath("webresources") 9 | public class MyApplication extends Application { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /jaxrs/db-access/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (7, 'Howard') 8 | INSERT INTO REST_DB_ACCESS("ID", "NAME") VALUES (8, 'Priya') -------------------------------------------------------------------------------- /jaxrs/fileupload/src/main/java/org/javaee7/jaxrs/fileupload/MyApplication.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.fileupload; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ApplicationPath("webresources") 10 | public class MyApplication extends Application { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /jaxrs/jaxrs-client/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jaxrs 8 | 1.0-SNAPSHOT 9 | 10 | 11 | jaxrs-jaxrs-client 12 | war 13 | Java EE 7 Sample: jaxrs - jaxrs-client 14 | 15 | 16 | -------------------------------------------------------------------------------- /jaxrs/jaxrs-client/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jaxrs/jaxrs-client/src/main/webapp/WEB-INF/beans.xml -------------------------------------------------------------------------------- /jaxrs/jaxrs-endpoint/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jaxrs 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxrs-jaxrs-endpoint 12 | war 13 | Java EE 7 Sample: jaxrs - jaxrs-endpoint 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/jaxrs-security-declarative/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /jaxrs/jaxrs-security-declarative/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /jaxrs/jsonp/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | jaxrs 7 | 1.0-SNAPSHOT 8 | 9 | 10 | jaxrs-jsonp 11 | war 12 | Java EE 7 Sample: jaxrs - jsonp 13 | 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/link/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 2 | 4 | 5 | 6 | 7 | 8 | JAX-RS 2 Links 9 | 10 | 11 |

JAX-RS 2 Links

12 | Invoke the Client. 13 | 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/paramconverter/README.adoc: -------------------------------------------------------------------------------- 1 | = JAX-RS ParamConverter and ParamConverterProvider 2 | 3 | This example demonstrate the use of a +ParamConverter+ / +ParamConverterProvider+ to set the request parameters in a user bean 4 | that has no constructor with a single +String+ argument, nor +fromValue(String)+ or +valueOf(String)+ methods. 5 | The +ParamConverter+ is registered by a +ParamConverterProvider+ annotated with +@Provider+. 6 | 7 | The +ParamConverter+ applies to JAX-RS Resource Method parameters annotated with +@MatrixParam+, +@QueryParam+, +@PathParam+, +@CookieParam+ and +@HeaderParam+. -------------------------------------------------------------------------------- /jaxrs/paramconverter/src/main/java/org/javaee7/jaxrs/paramconverter/MyApplication.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.paramconverter; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ApplicationPath("webresources") 10 | public class MyApplication extends Application { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /jaxrs/paramconverter/src/main/java/org/javaee7/jaxrs/paramconverter/MyBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.paramconverter; 2 | 3 | /** 4 | * @author Xavier Coulon 5 | * 6 | */ 7 | public class MyBean { 8 | 9 | private String value; 10 | 11 | /** 12 | * @return the value 13 | */ 14 | public String getValue() { 15 | return value; 16 | } 17 | 18 | /** 19 | * @param value the value to set 20 | */ 21 | public void setValue(String value) { 22 | this.value = value; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return getValue(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /jaxrs/readerwriter-injection/src/main/java/org/javaee7/jaxrs/readerwriter/injection/AnotherObject.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.readerwriter.injection; 2 | 3 | import javax.enterprise.context.ApplicationScoped; 4 | 5 | /** 6 | * @author Arun Gupta 7 | */ 8 | @ApplicationScoped 9 | public class AnotherObject { 10 | private int value; 11 | 12 | public int getValue() { 13 | return value; 14 | } 15 | 16 | public void setValue(int value) { 17 | this.value = value; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /jaxrs/readerwriter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jaxrs 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxrs-readerwriter 12 | war 13 | Java EE 7 Sample: jaxrs - readerwriter 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/server-negotiation/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jaxrs 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxrs-server-negotiation 12 | war 13 | Java EE 7 Sample: jaxrs - server-negotiation 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/server-negotiation/src/main/java/org/javaee7/jaxrs/server/negotiation/People.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.server.negotiation; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlRootElement; 8 | 9 | @XmlRootElement 10 | public class People extends ArrayList { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | @XmlElement(name = "person") 15 | public List getPeople() { 16 | return this; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /jaxrs/simple-get/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | jaxrs 7 | 1.0-SNAPSHOT 8 | 9 | 10 | simple-get 11 | war 12 | 13 | Java EE 7 Sample: jaxrs - simple-get 14 | 15 | 16 | -------------------------------------------------------------------------------- /jaxrs/simple-get/src/main/java/org/javaee7/jaxrs/simple/get/JaxRsActivator.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.jaxrs.simple.get; 3 | 4 | import javax.ws.rs.ApplicationPath; 5 | import javax.ws.rs.core.Application; 6 | 7 | /** 8 | * This class activates JAX-RS and sets the base path to "/rest". 9 | * 10 | * @author Arjan Tijms 11 | * 12 | */ 13 | @ApplicationPath("/rest") 14 | public class JaxRsActivator extends Application { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /jaxrs/simple-get/src/main/java/org/javaee7/jaxrs/simple/get/Resource.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | 3 | package org.javaee7.jaxrs.simple.get; 4 | 5 | import static javax.ws.rs.core.MediaType.TEXT_PLAIN; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.Produces; 10 | 11 | /** 12 | * A very simple JAX-RS resource class that just returns the string "hi!" 13 | * 14 | * @author Arjan Tijms 15 | * 16 | */ 17 | @Path("/resource") 18 | @Produces(TEXT_PLAIN) 19 | public class Resource { 20 | 21 | @GET 22 | @Path("hi") 23 | public String hi() { 24 | return "hi!"; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /jaxrs/singleton/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jaxrs 7 | org.javaee7 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxrs-singleton 12 | war 13 | Java EE 7 Sample: jaxrs - singleton 14 | 15 | -------------------------------------------------------------------------------- /jaxrs/singleton/src/main/java/org/javaee7/jaxrs/singleton/MyAnnotatedApplication.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxrs.singleton; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | import javax.ws.rs.core.Application; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ApplicationPath("webresources") 10 | public class MyAnnotatedApplication extends Application { 11 | } 12 | -------------------------------------------------------------------------------- /jaxws/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JAX-WS 2.2# 2 | 3 | The [JSR 224](https://jcp.org/en/jsr/detail?id=224) specification is the next generation web services API replacing JAX-RPC 1.0. 4 | 5 | ## Samples ## 6 | 7 | - jaxws-endpoint 8 | - jaxws-client 9 | 10 | ## How to run 11 | 12 | More information on how to run can be found at: 13 | 14 | 15 | -------------------------------------------------------------------------------- /jaxws/jaxws-client/README.md: -------------------------------------------------------------------------------- 1 | This JAX-WS sample generated Java service class from a .wsdl file, deploys the endpoint war generated by javaee7-samples/jaxws/jaxws-endpoint 2 | and then tests against that. -------------------------------------------------------------------------------- /jaxws/jaxws-endpoint-ejb/src/main/java/org/javaee7/jaxws/endpoint/ejb/EBookStore.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.jaxws.endpoint.ejb; 3 | 4 | import static javax.jws.soap.SOAPBinding.Style.RPC; 5 | 6 | import javax.jws.WebMethod; 7 | import javax.jws.WebService; 8 | import javax.jws.soap.SOAPBinding; 9 | 10 | /** 11 | * 12 | * @author Fermin Gallego 13 | * @author Arjan Tijms 14 | * 15 | */ 16 | @WebService 17 | @SOAPBinding(style = RPC) 18 | public interface EBookStore { 19 | 20 | @WebMethod 21 | String welcomeMessage(String name); 22 | } 23 | -------------------------------------------------------------------------------- /jaxws/jaxws-endpoint-ejb/src/main/java/org/javaee7/jaxws/endpoint/ejb/EBookStoreImpl.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7.jaxws.endpoint.ejb; 3 | 4 | import javax.ejb.Stateless; 5 | import javax.jws.WebService; 6 | 7 | /** 8 | * 9 | * @author Fermin Gallego 10 | * @author Arjan Tijms 11 | * 12 | */ 13 | @Stateless 14 | @WebService(endpointInterface = "org.javaee7.jaxws.endpoint.ejb.EBookStore") 15 | public class EBookStoreImpl implements EBookStore { 16 | 17 | @Override 18 | public String welcomeMessage(String name) { 19 | return "Welcome to EBookStore WebService, Mr/Mrs " + name; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jaxws/jaxws-endpoint/src/main/java/org/javaee7/jaxws/endpoint/EBookStore.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jaxws.endpoint; 2 | 3 | import java.util.List; 4 | 5 | import javax.jws.WebMethod; 6 | import javax.jws.WebService; 7 | 8 | /** 9 | * 10 | * @author Fermin Gallego 11 | * 12 | */ 13 | @WebService 14 | public interface EBookStore { 15 | 16 | @WebMethod 17 | String welcomeMessage(String name); 18 | 19 | @WebMethod 20 | List findEBooks(String text); 21 | 22 | @WebMethod 23 | EBook takeBook(String title); 24 | 25 | @WebMethod 26 | void saveBook(EBook eBook); 27 | 28 | @WebMethod 29 | EBook addAppendix(EBook eBook, int appendixPages); 30 | } 31 | -------------------------------------------------------------------------------- /jca/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JCA 1.7# 2 | 3 | The [JSR 322](https://jcp.org/en/jsr/detail?id=322) defines a standard architecture for connecting to Enterprise Information Systems. This JSR will enhance the existing specification with features requested by experts and community. 4 | 5 | ## Samples ## 6 | 7 | - connector-simple 8 | - mdb-filewatcher 9 | 10 | ## How to run 11 | 12 | More information on how to run can be found at: 13 | 14 | 15 | -------------------------------------------------------------------------------- /jca/connector-simple/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jca 6 | org.javaee7 7 | 1.0-SNAPSHOT 8 | 9 | 10 | jca-connector-simple-connector 11 | Java EE 7 Sample: jca - Connector simple 12 | 13 | 14 | -------------------------------------------------------------------------------- /jca/connector-simple/src/main/java/org/javaee7/jca/connector/simple/connector/outbound/MyConnectionFactory.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jca.connector.simple.connector.outbound; 2 | 3 | /** 4 | * 5 | * @author arungup 6 | */ 7 | public class MyConnectionFactory { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /jca/connector-simple/src/main/java/org/javaee7/jca/connector/simple/connector/outbound/MyInteraction.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jca.connector.simple.connector.outbound; 2 | 3 | /** 4 | * 5 | * @author arungup 6 | */ 7 | public class MyInteraction { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /jca/connector-simple/src/main/java/org/javaee7/jca/connector/simple/connector/outbound/MyManagedConnectionFactory.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jca.connector.simple.connector.outbound; 2 | 3 | /** 4 | * 5 | * @author arungup 6 | */ 7 | public class MyManagedConnectionFactory { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /jca/mdb-filewatcher/src/test/resources/glassfish-ejb-jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | FileWatchingMDB 7 | 8 | test#fswatcher 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jca/mdb-filewatcher/src/test/resources/jboss-ejb3.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | FileWatchingMDB 8 | test.ear#fswatcher.rar 9 | 10 | 11 | -------------------------------------------------------------------------------- /jms/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JMS 2.0# 2 | 3 | The [JSR 343](https://jcp.org/en/jsr/detail?id=343) is an update to the Java Message Service API, an existing API for accessing enterprise messaging systems from Java programs. 4 | 5 | ## Samples ## 6 | 7 | - jms-xa 8 | - send-receive 9 | - temp-destination 10 | - jms-batch 11 | 12 | ## How to run 13 | 14 | More information on how to run can be found at: 15 | 16 | 17 | -------------------------------------------------------------------------------- /jms/jms-batch/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | jms 7 | 1.0-SNAPSHOT 8 | 9 | 10 | jms-jms-batch 11 | Java EE 7 Sample: jms - jms-batch 12 | ItemReader reading from durable subscription 13 | 14 | -------------------------------------------------------------------------------- /jms/jms-batch/src/main/resources/META-INF/batch-jobs/jms-job.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jms/jms-xa/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.javaee7 8 | 1.0-SNAPSHOT 9 | 10 | jms-jms-xa 11 | war 12 | Java EE 7 Sample: jms - jms-xa 13 | Arquillian test for JMS XA 14 | 15 | -------------------------------------------------------------------------------- /jms/jms-xa/src/main/java/org/javaee7/jms/xa/DeliveryStats.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jms.xa; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | 5 | import javax.ejb.Singleton; 6 | 7 | @Singleton 8 | public class DeliveryStats { 9 | 10 | public static CountDownLatch countDownLatch = new CountDownLatch(1); 11 | 12 | private long deliveredMessagesCount; 13 | 14 | public long getDeliveredMessagesCount() { 15 | return deliveredMessagesCount; 16 | } 17 | 18 | public void messageDelivered() { 19 | deliveredMessagesCount++; 20 | } 21 | 22 | public void reset() { 23 | deliveredMessagesCount = 0L; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jms/jms-xa/src/main/java/org/javaee7/jms/xa/User.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jms.xa; 2 | 3 | import javax.persistence.Entity; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | 7 | @Entity 8 | @Table(name = "T_USERS") 9 | public class User { 10 | 11 | @Id 12 | private String email; 13 | 14 | public User() { 15 | } 16 | 17 | public User(String email) { 18 | this.email = email; 19 | } 20 | 21 | public String getEmail() { 22 | return email; 23 | } 24 | 25 | public void setEmail(String email) { 26 | this.email = email; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /jms/jms-xa/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO T_USERS("EMAIL") VALUES ('jack@itcrowd.pl') 2 | -------------------------------------------------------------------------------- /jms/jms-xa/src/test/java/org/javaee7/jms/xa/producers/NonXAConnectionFactoryProducer.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jms.xa.producers; 2 | 3 | import javax.annotation.Resource; 4 | import javax.enterprise.inject.Produces; 5 | import javax.jms.ConnectionFactory; 6 | 7 | public class NonXAConnectionFactoryProducer { 8 | 9 | @Produces 10 | @Resource(lookup = "java:app/jms/nonXAconnectionFactory") 11 | private ConnectionFactory connectionFactory; 12 | } 13 | -------------------------------------------------------------------------------- /jms/jms-xa/src/test/java/org/javaee7/jms/xa/producers/XAConnectionFactoryProducer.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jms.xa.producers; 2 | 3 | import javax.annotation.Resource; 4 | import javax.enterprise.inject.Produces; 5 | import javax.jms.ConnectionFactory; 6 | 7 | public class XAConnectionFactoryProducer { 8 | 9 | @Produces 10 | @Resource(lookup = "java:app/jms/xaConnectionFactory") 11 | private ConnectionFactory connectionFactory; 12 | } 13 | -------------------------------------------------------------------------------- /jms/send-receive/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /jms/temp-destination/src/main/java/org/javaee7/jms/temp/destination/Resources.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jms.temp.destination; 2 | 3 | import javax.jms.JMSDestinationDefinition; 4 | 5 | /** 6 | * Application scoped JMS resources for the samples. 7 | * 8 | * @author Patrik Dudits 9 | */ 10 | @JMSDestinationDefinition( 11 | name = Resources.REQUEST_QUEUE, 12 | interfaceName = "javax.jms.Queue", 13 | destinationName = "requestQueue", 14 | description = "Queue for service requests") 15 | public class Resources { 16 | public static final String REQUEST_QUEUE = "java:global/jms/requestQueue"; 17 | } 18 | -------------------------------------------------------------------------------- /jpa/aggregate-function-in-select/src/main/java/org/javaee7/jpa/aggregate_function_in_select/entity/AggregatedTestEntity.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.aggregate_function_in_select.entity; 2 | 3 | /** 4 | * A very simple DTO that will be used to aggregate TestEnity to 5 | * 6 | * @author Arjan Tijms 7 | * 8 | */ 9 | public class AggregatedTestEntity { 10 | 11 | private String values; 12 | 13 | public AggregatedTestEntity(String values) { 14 | this.values = values; 15 | } 16 | 17 | public String getValues() { 18 | return values; 19 | } 20 | 21 | public void setValues(String values) { 22 | this.values = values; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /jpa/criteria/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_CRITERIA("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null) -------------------------------------------------------------------------------- /jpa/criteria/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_CRITERIA -------------------------------------------------------------------------------- /jpa/criteria/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_CRITERIA("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_CRITERIA("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_CRITERIA("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_CRITERIA("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/datasourcedefinition-annotation-pu/src/main/java/org/javaee7/jpa/datasourcedefinition_annotation_pu/config/DataSourceDefinitionConfig.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.datasourcedefinition_annotation_pu.config; 2 | 3 | import javax.annotation.sql.DataSourceDefinition; 4 | import javax.ejb.Stateless; 5 | 6 | @DataSourceDefinition( 7 | name = "java:app/MyApp/MyDS", 8 | className = "org.h2.jdbcx.JdbcDataSource", 9 | url = "jdbc:h2:mem:test") 10 | @Stateless 11 | public class DataSourceDefinitionConfig { 12 | } 13 | -------------------------------------------------------------------------------- /jpa/datasourcedefinition/src/main/java/org/javaee7/jpa/datasourcedefinition/DataSourceDefinitionHolder.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.datasourcedefinition; 2 | 3 | import javax.annotation.sql.DataSourceDefinition; 4 | import javax.ejb.Stateless; 5 | 6 | /** 7 | * @author Alexis Hassler 8 | */ 9 | @DataSourceDefinition(name = "java:global/MyApp/MyDataSource", 10 | className = "org.h2.jdbcx.JdbcDataSource", 11 | url = "jdbc:h2:mem:test") 12 | @Stateless 13 | public class DataSourceDefinitionHolder { 14 | } 15 | -------------------------------------------------------------------------------- /jpa/default-datasource/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-default-datasource 12 | war 13 | Java EE 7 Sample: jpa - default-datasource 14 | 15 | -------------------------------------------------------------------------------- /jpa/default-datasource/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Penny') 2 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Sheldon') 3 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Amy') 4 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Leonard') 5 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Bernadette') 6 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Raj') 7 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Howard') 8 | INSERT INTO EMPLOYEE_SCHEMA_DEFAULT_DATASOURCE("NAME") VALUES ('Priya') -------------------------------------------------------------------------------- /jpa/entitygraph/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-entitygraph 12 | war 13 | Java EE 7 Sample: jpa - entitygraph 14 | 15 | -------------------------------------------------------------------------------- /jpa/entitygraph/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_ACTOR_AWARDS_ENTITY_GRAPH 2 | DROP TABLE MOVIE_AWARDS_ENTITY_GRAPH 3 | DROP TABLE MOVIE_DIRECTORS_ENTITY_GRAPH 4 | DROP TABLE MOVIE_ACTORS_ENTITY_GRAPH 5 | DROP TABLE MOVIE_ENTITY_GRAPH 6 | -------------------------------------------------------------------------------- /jpa/extended-pc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-extended-pc 12 | war 13 | Java EE 7 Sample: jpa - extended-pc 14 | 15 | -------------------------------------------------------------------------------- /jpa/extended-pc/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE CHARACTERS ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/extended-pc/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE CHARACTERS -------------------------------------------------------------------------------- /jpa/extended-pc/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO CHARACTERS("ID", "NAME") VALUES (7, 'Howard') -------------------------------------------------------------------------------- /jpa/jndi-context/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_JNDI_CONTEXT ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) 2 | -------------------------------------------------------------------------------- /jpa/jndi-context/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_JNDI_CONTEXT 2 | -------------------------------------------------------------------------------- /jpa/jndi-context/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (7, 'Howard') 8 | INSERT INTO EMPLOYEE_JNDI_CONTEXT("ID", "NAME") VALUES (8, 'Priya') 9 | -------------------------------------------------------------------------------- /jpa/jpa-converter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | 10 | 11 | jpa-jpa-converter 12 | jar 13 | 14 | Java EE 7 Sample: jpa-converter 15 | 16 | -------------------------------------------------------------------------------- /jpa/jpa-converter/src/main/java/org/javaee7/jpa/converter/CreditCardConverter.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.converter; 2 | 3 | import javax.persistence.AttributeConverter; 4 | import javax.persistence.Converter; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @Converter 10 | public class CreditCardConverter implements AttributeConverter { 11 | 12 | @Override 13 | public String convertToDatabaseColumn(CreditCard attribute) { 14 | return attribute.toString(); 15 | } 16 | 17 | @Override 18 | public CreditCard convertToEntityAttribute(String card) { 19 | return new CreditCard(card); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /jpa/jpa-converter/src/main/java/org/javaee7/jpa/converter/EmployeeRepository.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.converter; 2 | 3 | import java.util.List; 4 | import javax.ejb.Stateless; 5 | import javax.persistence.EntityManager; 6 | import javax.persistence.PersistenceContext; 7 | 8 | /** 9 | * @author Arun Gupta 10 | */ 11 | @Stateless 12 | public class EmployeeRepository { 13 | 14 | @PersistenceContext 15 | private EntityManager em; 16 | 17 | public void persist(Employee e) { 18 | em.persist(e); 19 | } 20 | 21 | public List all() { 22 | return em.createNamedQuery("Employee.findAll", Employee.class).getResultList(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /jpa/jpa-converter/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_SCHEMA_CONVERTER ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "CARD" VARCHAR(15) not null) -------------------------------------------------------------------------------- /jpa/jpa-converter/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_SCHEMA_CONVERTER -------------------------------------------------------------------------------- /jpa/jpa-converter/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (1, 'Leonard', '11-22-33-44') 2 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (2, 'Sheldon', '22-33-44-55') 3 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (3, 'Penny', '33-44-55-66') 4 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (4, 'Raj', '44-55-66-77') 5 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (5, 'Howard', '55-66-77-88') 6 | INSERT INTO EMPLOYEE_SCHEMA_CONVERTER("ID", "NAME", "CARD") VALUES (6, 'Bernadette', '66-77-88-99') -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/java/org/javaee7/jpa/listeners/Language.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.listeners; 2 | 3 | /** 4 | * @author Patrik Dudits 5 | */ 6 | public enum Language { 7 | ENGLISH, GERMAN; 8 | } 9 | -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/java/org/javaee7/jpa/listeners/MovieBean.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.listeners; 2 | 3 | import javax.ejb.Stateless; 4 | import javax.persistence.EntityManager; 5 | import javax.persistence.PersistenceContext; 6 | 7 | /** 8 | * @author Kuba Marchwicki 9 | */ 10 | @Stateless 11 | public class MovieBean { 12 | @PersistenceContext 13 | private EntityManager em; 14 | 15 | public Movie getMovieByName(String name) { 16 | return em.createNamedQuery(Movie.FIND_BY_NAME, Movie.class) 17 | .setParameter("name", name) 18 | .getSingleResult(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/java/org/javaee7/jpa/listeners/MovieListener.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.listeners; 2 | 3 | import javax.ejb.EJB; 4 | import javax.persistence.PostLoad; 5 | 6 | /** 7 | * @author Kuba Marchwicki 8 | */ 9 | public class MovieListener { 10 | 11 | @EJB 12 | RatingService service; 13 | 14 | @PostLoad 15 | public void loadMovieRating(Movie movie) { 16 | Integer rating = service.movieRating(movie.getName()); 17 | movie.setRating(rating); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/java/org/javaee7/jpa/listeners/RatingService.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.listeners; 2 | 3 | import javax.ejb.Stateless; 4 | import javax.persistence.EntityManager; 5 | import javax.persistence.PersistenceContext; 6 | 7 | /** 8 | * @author Kuba Marchwicki 9 | */ 10 | 11 | @Stateless 12 | public class RatingService { 13 | @PersistenceContext 14 | private EntityManager em; 15 | 16 | public Integer movieRating(String name) { 17 | return em.createNamedQuery(Rating.FIND_BY_NAME, Rating.class) 18 | .setParameter("name", name) 19 | .getSingleResult() 20 | .getRating(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_LISTENER("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null, "LANGUAGE" VARCHAR(12)) 2 | CREATE TABLE MOVIE_RATINGS("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "RATING" INTEGER not null) -------------------------------------------------------------------------------- /jpa/listeners-injection/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_LISTENER 2 | DROP TABLE MOVIE_RATINGS 3 | -------------------------------------------------------------------------------- /jpa/listeners/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_LISTENER("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null) -------------------------------------------------------------------------------- /jpa/listeners/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_LISTENER -------------------------------------------------------------------------------- /jpa/listeners/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_LISTENER("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/locking-optimistic/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_OPTIMISTIC("ID", "NAME", "ACTORS", "VERSION") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss', 0) 2 | INSERT INTO MOVIE_OPTIMISTIC("ID", "NAME", "ACTORS", "VERSION") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen', 0) 3 | INSERT INTO MOVIE_OPTIMISTIC("ID", "NAME", "ACTORS", "VERSION") VALUES (3, 'Inception', 'Leonardo DiCaprio', 0) 4 | INSERT INTO MOVIE_OPTIMISTIC("ID", "NAME", "ACTORS", "VERSION") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall', 0) 5 | -------------------------------------------------------------------------------- /jpa/locking-pessimistic/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_PESSIMISTIC("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_PESSIMISTIC("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_PESSIMISTIC("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_PESSIMISTIC("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/locking-pessimistic/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /jpa/multiple-pu/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_MULTIPLE_PU("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null) -------------------------------------------------------------------------------- /jpa/multiple-pu/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_MULTIPLE_PU -------------------------------------------------------------------------------- /jpa/multiple-pu/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_MULTIPLE_PU("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_MULTIPLE_PU("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_MULTIPLE_PU("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_MULTIPLE_PU("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/native-sql-resultset-mapping/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_NATIVE_SQL_RESULTSET_MAPPING ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/native-sql-resultset-mapping/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_NATIVE_SQL_RESULTSET_MAPPING -------------------------------------------------------------------------------- /jpa/native-sql/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_NATIVE_SQL ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/native-sql/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_NATIVE_SQL -------------------------------------------------------------------------------- /jpa/native-sql/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (7, 'Howard') 8 | INSERT INTO EMPLOYEE_NATIVE_SQL("ID", "NAME") VALUES (8, 'Priya') -------------------------------------------------------------------------------- /jpa/ordercolumn/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-ordercolumn 12 | war 13 | Java EE 7 Sample: jpa - ordercolumn 14 | 15 | -------------------------------------------------------------------------------- /jpa/ordercolumn/src/main/java/org/javaee7/jpa/ordercolumn/entity/unidirectional/Child.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.jpa.ordercolumn.entity.unidirectional; 2 | 3 | import static javax.persistence.GenerationType.IDENTITY; 4 | 5 | import javax.persistence.Entity; 6 | import javax.persistence.GeneratedValue; 7 | import javax.persistence.Id; 8 | 9 | @Entity 10 | public class Child { 11 | 12 | @Id 13 | @GeneratedValue(strategy = IDENTITY) 14 | private Long id; 15 | 16 | @SuppressWarnings("unused") 17 | private int dummy = 1; 18 | 19 | public Long getId() { 20 | return id; 21 | } 22 | 23 | public void setId(Long id) { 24 | this.id = id; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /jpa/ordercolumn/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jpa/pu-typesafe/src/main/resources/META-INF/.LCKcreate.sql~: -------------------------------------------------------------------------------- 1 | /Users/arungup/code/workspaces/arun/javaee7-samples/samples/jpa/multiple-pu/src/main/resources/META-INF/create.sql -------------------------------------------------------------------------------- /jpa/pu-typesafe/src/main/resources/META-INF/.LCKpersistence.xml~: -------------------------------------------------------------------------------- 1 | /Users/arungup/code/workspaces/arun/javaee7-samples/samples/jpa/multiple-pu/src/main/resources/META-INF/persistence.xml -------------------------------------------------------------------------------- /jpa/pu-typesafe/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_PU_TYPESAFE("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null) -------------------------------------------------------------------------------- /jpa/pu-typesafe/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_PU_TYPESAFE -------------------------------------------------------------------------------- /jpa/pu-typesafe/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_PU_TYPESAFE("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_PU_TYPESAFE("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_PU_TYPESAFE("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_PU_TYPESAFE("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/schema-gen-index/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.javaee7 6 | jpa 7 | 1.0-SNAPSHOT 8 | 9 | 10 | jpa-schema-gen-index 11 | 12 | war 13 | Java EE 7 Sample: jpa - schema-gen-index 14 | 15 | -------------------------------------------------------------------------------- /jpa/schema-gen-metadata/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-schema-gen-metadata 12 | war 13 | Java EE 7 Sample: jpa - schema-gen-metadata 14 | 15 | -------------------------------------------------------------------------------- /jpa/schema-gen-metadata/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (7, 'Howard') 8 | INSERT INTO EMPLOYEE_SCHEMA_GEN_METADATA("ID", "NAME") VALUES (8, 'Priya') -------------------------------------------------------------------------------- /jpa/schema-gen-scripts-external/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_SCHEMA_GEN_SCRIPTS_EXTERNAL ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/schema-gen-scripts-external/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_SCHEMA_GEN_SCRIPTS_EXTERNAL -------------------------------------------------------------------------------- /jpa/schema-gen-scripts/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_SCHEMA_GEN_SCRIPTS ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/schema-gen-scripts/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_SCHEMA_GEN_SCRIPTS -------------------------------------------------------------------------------- /jpa/schema-gen-scripts/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (7, 'Howard') 8 | INSERT INTO EMPLOYEE_SCHEMA_GEN_SCRIPTS("ID", "NAME") VALUES (8, 'Priya') -------------------------------------------------------------------------------- /jpa/storedprocedure/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE MOVIE_STORED_PROCEDURE("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null, "ACTORS" VARCHAR(200) not null) 2 | -------------------------------------------------------------------------------- /jpa/storedprocedure/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE MOVIE_STORED_PROCEDURE 2 | -------------------------------------------------------------------------------- /jpa/storedprocedure/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO MOVIE_STORED_PROCEDURE("ID", "NAME", "ACTORS") VALUES (1, 'The Matrix', 'Keanu Reeves, Laurence Fishburne, Carrie-Ann Moss') 2 | INSERT INTO MOVIE_STORED_PROCEDURE("ID", "NAME", "ACTORS") VALUES (2, 'The Lord of The Rings', 'Elijah Wood, Ian Mckellen, Viggo Mortensen') 3 | INSERT INTO MOVIE_STORED_PROCEDURE("ID", "NAME", "ACTORS") VALUES (3, 'Inception', 'Leonardo DiCaprio') 4 | INSERT INTO MOVIE_STORED_PROCEDURE("ID", "NAME", "ACTORS") VALUES (4, 'The Shining', 'Jack Nicholson, Shelley Duvall') -------------------------------------------------------------------------------- /jpa/unsynchronized-pc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jpa 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jpa-unsynchronized-pc 12 | war 13 | Java EE 7 Sample: jpa - unsynchronized-pc 14 | 15 | -------------------------------------------------------------------------------- /jpa/unsynchronized-pc/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jpa/unsynchronized-pc/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC -------------------------------------------------------------------------------- /jpa/unsynchronized-pc/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_SCHEMA_UNSYNCHRONIZED_PC("ID", "NAME") VALUES (7, 'Howard') -------------------------------------------------------------------------------- /jsf/ajax/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /jsf/ajax/src/main/webapp/resources/stylesheets/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | Document : main 3 | Created on : May 25, 2013, 12:35:17 PM 4 | Author : arungup 5 | Description: 6 | Purpose of the stylesheet follows. 7 | */ 8 | 9 | root { 10 | display: block; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /jsf/components/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /jsf/components/src/main/webapp/images/glassfish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/components/src/main/webapp/images/glassfish.png -------------------------------------------------------------------------------- /jsf/components/src/main/webapp/next.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Facelet Title 7 | 8 | 9 | Hello from Facelets 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /jsf/components/src/main/webapp/resources/stylesheets/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | Document : main 3 | Created on : May 25, 2013, 12:35:17 PM 4 | Author : arungup 5 | Description: 6 | Purpose of the stylesheet follows. 7 | */ 8 | 9 | root { 10 | display: block; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /jsf/components/src/main/webapp/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | 7 | -------------------------------------------------------------------------------- /jsf/composite-component/src/main/webapp/resources/stylesheets/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | Document : main 3 | Created on : May 25, 2013, 12:35:17 PM 4 | Author : arungup 5 | Description: 6 | Purpose of the stylesheet follows. 7 | */ 8 | 9 | root { 10 | display: block; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /jsf/contracts-library-impl/src/main/resources/META-INF/contracts/blue/javax.faces.contract.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/contracts-library-impl/src/main/resources/META-INF/contracts/blue/javax.faces.contract.xml -------------------------------------------------------------------------------- /jsf/contracts-library-impl/src/main/resources/META-INF/contracts/red/javax.faces.contract.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/contracts-library-impl/src/main/resources/META-INF/contracts/red/javax.faces.contract.xml -------------------------------------------------------------------------------- /jsf/contracts-library/src/main/webapp/WEB-INF/lib/contracts-library-impl-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/contracts-library/src/main/webapp/WEB-INF/lib/contracts-library-impl-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /jsf/contracts/faces-config.NavData: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /jsf/http-get/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | jsf 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | jsf-http-get 12 | war 13 | Java EE 7 Sample: jsf - http-get 14 | 15 | -------------------------------------------------------------------------------- /jsf/http-get/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /jsf/http-get/src/main/webapp/login.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | HTTP GET (Login) 7 | 8 | 9 |

HTTP GET (Login)

10 | 11 | Login page invoked using HTTP GET 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /jsf/resource-handling/src/main/webapp/resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/resource-handling/src/main/webapp/resources/.DS_Store -------------------------------------------------------------------------------- /jsf/resource-handling/src/main/webapp/resources/corp/sun-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/resource-handling/src/main/webapp/resources/corp/sun-logo.png -------------------------------------------------------------------------------- /jsf/resource-handling/src/main/webapp/resources/scripts/myScript.js: -------------------------------------------------------------------------------- 1 | document.write("Hello, this is from JavaScript bundled in resources!"); -------------------------------------------------------------------------------- /jsf/resource-handling/src/main/webapp/resources/wildfly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/resource-handling/src/main/webapp/resources/wildfly.png -------------------------------------------------------------------------------- /jsf/server-extension/src/main/java/org/javaee7/jsf/server/extension/.t.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/jsf/server-extension/src/main/java/org/javaee7/jsf/server/extension/.t.swp -------------------------------------------------------------------------------- /jsf/server-extension/src/main/webapp/converter.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | Server-side Extension 7 | 8 | 9 |

Called after Converter

10 | Got age: 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /json/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JSON-P 1.0# 2 | 3 | The [JSR 353](https://jcp.org/en/jsr/detail?id=353) specifies a Java API to process (for e.g. parse, generate, transform and query) JSON. 4 | 5 | ## Samples ## 6 | 7 | - object-builder 8 | - object-reader 9 | - streaming-generate 10 | - streaming-parser 11 | 12 | ## How to run 13 | 14 | More information on how to run can be found at: 15 | 16 | 17 | -------------------------------------------------------------------------------- /json/object-builder/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | json 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | json-object-builder 12 | war 13 | Java EE 7 Sample: json - object-builder 14 | 15 | -------------------------------------------------------------------------------- /json/object-reader/src/test/resources/1.json: -------------------------------------------------------------------------------- 1 | { } 2 | -------------------------------------------------------------------------------- /json/object-reader/src/test/resources/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "apple":"red", 3 | "banana":"yellow" 4 | } -------------------------------------------------------------------------------- /json/object-reader/src/test/resources/3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "apple":"red" }, 3 | { "banana":"yellow" } 4 | ] -------------------------------------------------------------------------------- /json/object-reader/src/test/resources/4.json: -------------------------------------------------------------------------------- 1 | { 2 | "title":"The Matrix", 3 | "year":1999, 4 | "cast":[ 5 | "Keanu Reaves", 6 | "Laurence Fishburne", 7 | "Carrie-Anne Moss" 8 | ] 9 | } -------------------------------------------------------------------------------- /json/streaming-parser/src/test/resources/1.json: -------------------------------------------------------------------------------- 1 | { } 2 | -------------------------------------------------------------------------------- /json/streaming-parser/src/test/resources/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "apple":"red", 3 | "banana":"yellow" 4 | } -------------------------------------------------------------------------------- /json/streaming-parser/src/test/resources/3.json: -------------------------------------------------------------------------------- 1 | [ 2 | { "apple":"red" }, 3 | { "banana":"yellow" } 4 | ] -------------------------------------------------------------------------------- /json/streaming-parser/src/test/resources/4.json: -------------------------------------------------------------------------------- 1 | { 2 | "title":"The Matrix", 3 | "year":1999, 4 | "cast":[ 5 | "Keanu Reaves", 6 | "Laurence Fishburne", 7 | "Carrie-Anne Moss" 8 | ] 9 | } -------------------------------------------------------------------------------- /jta/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: JTA 1.2# 2 | 3 | The [JSR 907](https://jcp.org/en/jsr/detail?id=907) specifies a revisions to the JTA specification. 4 | 5 | ## Samples ## 6 | 7 | - transactional 8 | - tx-exception 9 | - user-transaction 10 | 11 | ## How to run 12 | 13 | More information on how to run can be found at: 14 | 15 | 16 | -------------------------------------------------------------------------------- /jta/transactional/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /jta/tx-exception/src/main/resources/META-INF/create.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE EMPLOYEE_SCHEMA_JTA ("ID" INTEGER not null primary key, "NAME" VARCHAR(50) not null) -------------------------------------------------------------------------------- /jta/tx-exception/src/main/resources/META-INF/drop.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE EMPLOYEE_SCHEMA_JTA -------------------------------------------------------------------------------- /jta/tx-exception/src/main/resources/META-INF/load.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (1, 'Penny') 2 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (2, 'Sheldon') 3 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (3, 'Amy') 4 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (4, 'Leonard') 5 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (5, 'Bernadette') 6 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (6, 'Raj') 7 | INSERT INTO EMPLOYEE_SCHEMA_JTA("ID", "NAME") VALUES (7, 'Howard') -------------------------------------------------------------------------------- /jta/tx-exception/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /jta/user-transaction/src/test/resources/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /servlet/async-servlet/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | servlet 8 | 1.0-SNAPSHOT 9 | 10 | 11 | servlet-async-servlet 12 | war 13 | 14 | Java EE 7 Sample: servlet - async-servlet 15 | 16 | -------------------------------------------------------------------------------- /servlet/error-mapping/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | servlet 8 | 1.0-SNAPSHOT 9 | 10 | 11 | servlet-error-mapping 12 | war 13 | 14 | Java EE 7 Sample: servlet - error-mapping 15 | 16 | -------------------------------------------------------------------------------- /servlet/programmatic-registration/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | servlet 8 | 1.0-SNAPSHOT 9 | 10 | 11 | servlet-programmatic-registration 12 | war 13 | 14 | Java EE 7 Sample: servlet - programmatic-registration 15 | 16 | -------------------------------------------------------------------------------- /servlet/resource-packaging/src/main/webapp/WEB-INF/lib/myResources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/servlet/resource-packaging/src/main/webapp/WEB-INF/lib/myResources.jar -------------------------------------------------------------------------------- /servlet/security-allow-uncovered/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | g1 6 | g1 7 | 8 | 9 | -------------------------------------------------------------------------------- /servlet/security-allow-uncovered/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-allow-uncovered/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-annotated/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | BASIC 8 | file 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /servlet/security-annotated/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-annotated/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-basicauth-omission/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-basicauth-omission/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-basicauth/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-basicauth/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-clientcert-jce/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | g1 10 | g1 11 | CN=u1 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /servlet/security-clientcert/.gitignore: -------------------------------------------------------------------------------- 1 | /clientKeyStore.jks 2 | /clientTrustStore.jks 3 | -------------------------------------------------------------------------------- /servlet/security-deny-uncovered/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | g1 6 | g1 7 | 8 | 9 | -------------------------------------------------------------------------------- /servlet/security-deny-uncovered/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-deny-uncovered/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-form-based/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-form-based/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/security-programmatic/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | g1 6 | g1 7 | g1 8 | 9 | 10 | -------------------------------------------------------------------------------- /servlet/security-programmatic/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | g1 8 | 9 | 10 | -------------------------------------------------------------------------------- /servlet/security-programmatic/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 2 | 4 | 5 | 6 | 7 | 8 | Servlet Form-Based Security - Success 9 | 10 | 11 |

Servlet Programmatic Security

12 | 13 | Call Servlet 14 | 15 | 16 | -------------------------------------------------------------------------------- /servlet/security-programmatic/src/test/resources/addUsersPayara.txt: -------------------------------------------------------------------------------- 1 | create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1 -------------------------------------------------------------------------------- /servlet/security-programmatic/src/test/resources/password.txt: -------------------------------------------------------------------------------- 1 | AS_ADMIN_USERPASSWORD=p1 2 | -------------------------------------------------------------------------------- /servlet/simple-servlet/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.javaee7 7 | servlet 8 | 1.0-SNAPSHOT 9 | 10 | 11 | servlet-simple-servlet 12 | war 13 | 14 | Java EE 7 Sample: servlet - simple-servlet 15 | 16 | -------------------------------------------------------------------------------- /servlet/simple-servlet/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 2 | 4 | 5 | 6 | 7 | 8 | Simple Servlet 9 | 10 | 11 |

Simple Servlet

12 | Call the servlet. 13 | 14 | 15 | -------------------------------------------------------------------------------- /servlet/web-fragment/src/main/webapp/WEB-INF/lib/my-web-fragment.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/servlet/web-fragment/src/main/webapp/WEB-INF/lib/my-web-fragment.jar -------------------------------------------------------------------------------- /test-utils/src/main/java/org/javaee7/Libraries.java: -------------------------------------------------------------------------------- 1 | package org.javaee7; 2 | 3 | import org.jboss.shrinkwrap.api.spec.JavaArchive; 4 | import org.jboss.shrinkwrap.resolver.api.maven.Maven; 5 | 6 | public class Libraries { 7 | 8 | public static JavaArchive[] awaitability() { 9 | return Maven.resolver() 10 | .loadPomFromFile("pom.xml") 11 | .resolve("org.assertj:assertj-core", "com.jayway.awaitility:awaitility") 12 | .withTransitivity() 13 | .as(JavaArchive.class); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test-utils/src/main/java/org/javaee7/Parameter.java: -------------------------------------------------------------------------------- 1 | package org.javaee7; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Target({ElementType.FIELD}) 10 | public @interface Parameter { 11 | } 12 | 13 | -------------------------------------------------------------------------------- /test-utils/src/main/java/org/javaee7/RemoteEJBContextFactory.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7; 3 | 4 | import java.util.Iterator; 5 | import java.util.ServiceLoader; 6 | 7 | public class RemoteEJBContextFactory { 8 | 9 | public static RemoteEJBContextProvider getProvider() { 10 | 11 | ServiceLoader loader = ServiceLoader.load(RemoteEJBContextProvider.class); 12 | 13 | Iterator providers = loader.iterator(); 14 | 15 | if (!providers.hasNext()) { 16 | return null; 17 | } 18 | 19 | return providers.next(); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /test-utils/src/main/java/org/javaee7/RemoteEJBContextProvider.java: -------------------------------------------------------------------------------- 1 | /** Copyright Payara Services Limited **/ 2 | package org.javaee7; 3 | 4 | import javax.naming.Context; 5 | 6 | public interface RemoteEJBContextProvider { 7 | Context getContextWithCredentialsSet(String username, String password); 8 | void releaseContext(); 9 | } 10 | -------------------------------------------------------------------------------- /test-utils/src/main/resources/tomcat-users.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /validation/README.md: -------------------------------------------------------------------------------- 1 | # Java EE 7 Samples: Bean Validation 1.1# 2 | 3 | The [JSR 303](https://jcp.org/en/jsr/detail?id=303) specifies a meta-data model and API for JavaBeanTM validation based on annotations, with overrides and extended meta-data through the use of XML validation descriptors. 4 | 5 | ## Samples ## 6 | 7 | - methods 8 | - custom-constraint 9 | 10 | ## How to run 11 | 12 | More information on how to run can be found at: 13 | 14 | 15 | -------------------------------------------------------------------------------- /validation/custom-constraint/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | # To change this license header, choose License Headers in Project Properties. 2 | # To change this template file, choose Tools | Templates 3 | # and open the template in the editor. 4 | 5 | org.sample.zipcode.min_size=At least 5 characters must be specified 6 | org.sample.zipcode.cannot_be_null=Cannot be null 7 | org.sample.zipcode.invalid_zipcode=Invalid zipcode -------------------------------------------------------------------------------- /validation/methods/src/main/java/org/javaee7/validation/methods/MyParameter.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.validation.methods; 2 | 3 | import javax.validation.constraints.NotNull; 4 | 5 | public class MyParameter { 6 | 7 | @NotNull 8 | public String value; 9 | 10 | public String getValue() { 11 | return value; 12 | } 13 | 14 | public void setValue(String value) { 15 | this.value = value; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /websocket/atmosphere-chat/overlays/org.atmosphere.client.javascript-2.0.7.info: -------------------------------------------------------------------------------- 1 | 1412104997000 2 | (?:[^/]+/)*?[^/]*? 3 | META-INF(?:$|/.+) -------------------------------------------------------------------------------- /websocket/atmosphere-chat/overlays/org.atmosphere.client.javascript-2.0.7/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | DUMMY web.xml 2 | -------------------------------------------------------------------------------- /websocket/binary/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 4.0.0 5 | 6 | org.javaee7.websocket 7 | websocket-samples 8 | 1.0-SNAPSHOT 9 | ../pom.xml 10 | 11 | 12 | binary 13 | war 14 | 15 | -------------------------------------------------------------------------------- /websocket/chat/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.javaee7 5 | websocket 6 | 1.0-SNAPSHOT 7 | 8 | 9 | org.javaee7 10 | websocket-chat 11 | 12 | war 13 | Java EE 7 Sample: websocket - chat 14 | 15 | -------------------------------------------------------------------------------- /websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async/MyAsyncEndpointByteBuffer.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.endpoint.async; 2 | 3 | import java.nio.ByteBuffer; 4 | import javax.websocket.OnMessage; 5 | import javax.websocket.Session; 6 | import javax.websocket.server.ServerEndpoint; 7 | 8 | /** 9 | * @author Jacek Jackowiak 10 | */ 11 | @ServerEndpoint("/bytebuffer") 12 | public class MyAsyncEndpointByteBuffer { 13 | 14 | @OnMessage 15 | public void echoByteBuffer(ByteBuffer data, Session session) { 16 | session.getAsyncRemote().sendBinary(data); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async/MyAsyncEndpointByteBufferClient.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.endpoint.async; 2 | 3 | import java.nio.ByteBuffer; 4 | import javax.websocket.ClientEndpoint; 5 | import javax.websocket.OnMessage; 6 | 7 | /** 8 | * 9 | * @author Jacek Jackowiak 10 | */ 11 | @ClientEndpoint 12 | public class MyAsyncEndpointByteBufferClient { 13 | 14 | private ByteBuffer receivedMessage; 15 | 16 | @OnMessage 17 | public void onMessage(ByteBuffer msg) { 18 | receivedMessage = msg; 19 | } 20 | 21 | public ByteBuffer getReceivedMessage() { 22 | return receivedMessage; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /websocket/endpoint-async/src/main/java/org/javaee7/websocket/endpoint/async/MyAsyncEndpointTextClient.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.endpoint.async; 2 | 3 | import javax.websocket.*; 4 | 5 | /** 6 | * 7 | * @author Jacek Jackowiak 8 | */ 9 | @ClientEndpoint 10 | public class MyAsyncEndpointTextClient { 11 | 12 | private String receivedMessage; 13 | 14 | @OnMessage 15 | public void onMessage(String msg) { 16 | receivedMessage = msg; 17 | } 18 | 19 | public String getReceivedMessage() { 20 | return receivedMessage; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /websocket/endpoint-programmatic-config/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /websocket/endpoint-wss/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | org.javaee7.websocket 6 | websocket-samples 7 | 1.0-SNAPSHOT 8 | ../pom.xml 9 | 10 | 11 | org.javaee7.websocket 12 | endpoint-wss 13 | 1.0-SNAPSHOT 14 | war 15 | 16 | -------------------------------------------------------------------------------- /websocket/endpoint-wss/src/main/java/org/javaee7/websocket/endpoint/wss/MyEndpoint.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.endpoint.wss; 2 | 3 | import javax.websocket.OnMessage; 4 | import javax.websocket.server.ServerEndpoint; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ServerEndpoint("/websocket") 10 | public class MyEndpoint { 11 | 12 | @OnMessage 13 | public String echoText(String name) { 14 | return name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /websocket/javase-client/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | run 5 | 6 | jar 7 | 8 | 9 | process-classes 10 | org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 11 | 12 | 13 | -classpath %classpath org.javaee7.websocket.javase.client.Client 14 | java 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /websocket/websocket-vs-rest-payload/payloads.pcapng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee-samples/javaee7-samples/4a67b232d71bc2b3b6d418e955218fa71741b943/websocket/websocket-vs-rest-payload/payloads.pcapng -------------------------------------------------------------------------------- /websocket/websocket-vs-rest-payload/src/main/java/org/javaee7/websocket/websocket/vs/rest/payload/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.websocket.vs.rest.payload; 2 | 3 | import javax.ws.rs.core.Application; 4 | 5 | /** 6 | * @author Arun Gupta 7 | */ 8 | @javax.ws.rs.ApplicationPath("webresources") 9 | public class ApplicationConfig extends Application { 10 | } 11 | -------------------------------------------------------------------------------- /websocket/websocket-vs-rest-payload/src/main/java/org/javaee7/websocket/websocket/vs/rest/payload/MyRestEndpoint.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.websocket.vs.rest.payload; 2 | 3 | import javax.ws.rs.Consumes; 4 | import javax.ws.rs.POST; 5 | import javax.ws.rs.Path; 6 | import javax.ws.rs.Produces; 7 | 8 | /** 9 | * REST Web Service 10 | * 11 | * @author Arun Gupta 12 | */ 13 | @Path("rest") 14 | public class MyRestEndpoint { 15 | 16 | @POST 17 | @Consumes("text/plain") 18 | @Produces("text/plain") 19 | public String getXml(String payload) { 20 | return payload; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /websocket/websocket-vs-rest-payload/src/main/java/org/javaee7/websocket/websocket/vs/rest/payload/MyWebSocketEndpoint.java: -------------------------------------------------------------------------------- 1 | package org.javaee7.websocket.websocket.vs.rest.payload; 2 | 3 | import javax.websocket.OnMessage; 4 | import javax.websocket.server.ServerEndpoint; 5 | 6 | /** 7 | * @author Arun Gupta 8 | */ 9 | @ServerEndpoint("/websocket") 10 | public class MyWebSocketEndpoint { 11 | 12 | @OnMessage 13 | public String echoText(String text) { 14 | return text; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /websocket/websocket-vs-rest-payload/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html" pageEncoding="UTF-8"%> 2 | 3 | 4 | 5 | 6 | REST vs WebSocket - Payload 7 | 8 | 9 | 10 | 11 |

REST vs WebSocket - Payload

12 | 13 | Use Adavanced REST Client extension to send requests.
14 | Capture REST/HTTP headers using the extension.
15 | Capture WebSocket headers using Wireshark. 16 | 17 | 18 | -------------------------------------------------------------------------------- /websocket/websocket-vs-rest/src/main/webapp/stylesheet.css: -------------------------------------------------------------------------------- 1 | progress { 2 | -webkit-appearance: progress-bar; 3 | background-color:red; 4 | color: red; 5 | 6 | height: 3em; 7 | width: 30em; 8 | } --------------------------------------------------------------------------------