├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── archetypes ├── jaxrs-service-archetype │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ ├── META-INF │ │ └── maven │ │ │ └── archetype-metadata.xml │ │ └── archetype-resources │ │ ├── nb-configuration.xml │ │ ├── nbactions.xml │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ └── java │ │ ├── HelloApplication.java │ │ └── HelloWorld.java └── pom.xml ├── batch ├── phonebilling │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── batch │ │ │ └── phonebilling │ │ │ ├── BillPartitionMapper.java │ │ │ ├── BillProcessor.java │ │ │ ├── BillReader.java │ │ │ ├── BillWriter.java │ │ │ ├── CallRecordProcessor.java │ │ │ ├── CallRecordReader.java │ │ │ ├── CallRecordWriter.java │ │ │ ├── ItemNumberCheckpoint.java │ │ │ ├── beans │ │ │ └── JsfBean.java │ │ │ ├── items │ │ │ ├── CallRecord.java │ │ │ └── PhoneBill.java │ │ │ └── tools │ │ │ └── CallRecordLogCreator.java │ │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── webapp │ │ ├── WEB-INF │ │ ├── classes │ │ │ └── META-INF │ │ │ │ └── batch-jobs │ │ │ │ └── phonebilling.xml │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── jobstarted.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── pom.xml └── webserverlog │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── batch │ │ └── webserverlog │ │ ├── InfoItemProcessListener.java │ │ ├── InfoJobListener.java │ │ ├── ItemNumberCheckpoint.java │ │ ├── LogFilteredLineWriter.java │ │ ├── LogLineProcessor.java │ │ ├── LogLineReader.java │ │ ├── MobileBatchlet.java │ │ ├── beans │ │ └── JsfBean.java │ │ ├── items │ │ ├── LogFilteredLine.java │ │ └── LogLine.java │ │ └── tools │ │ └── WebServerLogCreator.java │ ├── resources │ └── .gitkeep │ └── webapp │ ├── WEB-INF │ ├── classes │ │ ├── META-INF │ │ │ └── batch-jobs │ │ │ │ └── webserverlog.xml │ │ └── log1.txt │ └── web.xml │ ├── index.xhtml │ ├── jobstarted.xhtml │ └── resources │ └── css │ └── default.css ├── case-studies ├── .pom.xml.swp ├── dukes-bookstore │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── dukesbookstore │ │ │ ├── components │ │ │ ├── AreaComponent.java │ │ │ └── MapComponent.java │ │ │ ├── converters │ │ │ └── CreditCardConverter.java │ │ │ ├── ejb │ │ │ ├── BookRequestBean.java │ │ │ └── ConfigBean.java │ │ │ ├── entity │ │ │ └── Book.java │ │ │ ├── exception │ │ │ ├── BookNotFoundException.java │ │ │ ├── BooksNotFoundException.java │ │ │ └── OrderException.java │ │ │ ├── listeners │ │ │ ├── AreaSelectedEvent.java │ │ │ ├── LinkBookChangeListener.java │ │ │ ├── MapBookChangeListener.java │ │ │ ├── NameChanged.java │ │ │ └── QuantityChanged.java │ │ │ ├── model │ │ │ └── ImageArea.java │ │ │ ├── renderers │ │ │ ├── AreaRenderer.java │ │ │ └── MapRenderer.java │ │ │ └── web │ │ │ ├── managedbeans │ │ │ ├── AbstractBean.java │ │ │ ├── BookDetailsBean.java │ │ │ ├── BookstoreBean.java │ │ │ ├── CashierBean.java │ │ │ ├── CatalogBean.java │ │ │ ├── LocaleBean.java │ │ │ ├── ShoppingCart.java │ │ │ ├── ShoppingCartItem.java │ │ │ └── ShowCartBean.java │ │ │ └── messages │ │ │ ├── Messages.properties │ │ │ ├── Messages_de.properties │ │ │ ├── Messages_es.properties │ │ │ └── Messages_fr.properties │ │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── webapp │ │ ├── WEB-INF │ │ ├── bookstore.taglib.xml │ │ ├── faces-config.xml │ │ └── web.xml │ │ ├── bookcashier.xhtml │ │ ├── bookcatalog.xhtml │ │ ├── bookdetails.xhtml │ │ ├── bookordererror.xhtml │ │ ├── bookreceipt.xhtml │ │ ├── bookshowcart.xhtml │ │ ├── bookstore.xhtml │ │ ├── bookstoreTemplate.xhtml │ │ ├── index.xhtml │ │ └── resources │ │ ├── css │ │ └── stylesheet.css │ │ └── images │ │ ├── book_201.jpg │ │ ├── book_202.jpg │ │ ├── book_203.jpg │ │ ├── book_205.jpg │ │ ├── book_206.jpg │ │ ├── book_207.jpg │ │ ├── book_all.jpg │ │ └── duke.books.gif ├── dukes-forest │ ├── dukes-payment │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── forest │ │ │ │ └── payment │ │ │ │ └── services │ │ │ │ ├── PaymentApplication.java │ │ │ │ └── PaymentService.java │ │ │ └── webapp │ │ │ └── WEB-INF │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ ├── dukes-resources │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── .gitkeep │ │ │ └── resources │ │ │ ├── META-INF │ │ │ ├── manifest.mf │ │ │ └── resources │ │ │ │ ├── css │ │ │ │ ├── default.css │ │ │ │ └── jsfcrud.css │ │ │ │ ├── img │ │ │ │ ├── GreenThumbSmall.png │ │ │ │ ├── JavaTopiary.png │ │ │ │ ├── background.jpg │ │ │ │ ├── cart.gif │ │ │ │ ├── empty_shopping_cart.png │ │ │ │ ├── full_shopping_cart.png │ │ │ │ ├── logo-small.png │ │ │ │ ├── refresh.png │ │ │ │ ├── tango_nature_icon.png │ │ │ │ └── top-background.jpg │ │ │ │ ├── js │ │ │ │ └── util.js │ │ │ │ └── util │ │ │ │ ├── breadcrumbs.xhtml │ │ │ │ ├── commandButtons.xhtml │ │ │ │ ├── menu.xhtml │ │ │ │ ├── productProfile.xhtml │ │ │ │ └── shoppingCart.xhtml │ │ │ ├── ValidationMessages.properties │ │ │ ├── ValidationMessages_es.properties │ │ │ └── bundles │ │ │ ├── Bundle.properties │ │ │ └── Bundle_es.properties │ ├── dukes-shipment │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── forest │ │ │ │ ├── qualifiers │ │ │ │ └── LoggedIn.java │ │ │ │ └── shipment │ │ │ │ ├── ejb │ │ │ │ └── OrderBrowser.java │ │ │ │ ├── session │ │ │ │ ├── AbstractFacade.java │ │ │ │ └── UserBean.java │ │ │ │ └── web │ │ │ │ ├── LocaleBean.java │ │ │ │ ├── ShippingBean.java │ │ │ │ ├── UserController.java │ │ │ │ └── util │ │ │ │ └── JsfUtil.java │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── faces-config.xml │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ ├── admin │ │ │ └── index.xhtml │ │ │ ├── index.xhtml │ │ │ ├── login.xhtml │ │ │ ├── template.xhtml │ │ │ ├── top.xhtml │ │ │ └── topbar.xhtml │ ├── dukes-store │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── forest │ │ │ │ ├── ejb │ │ │ │ ├── AbstractFacade.java │ │ │ │ ├── AdministratorBean.java │ │ │ │ ├── CategoryBean.java │ │ │ │ ├── EventDispatcherBean.java │ │ │ │ ├── GroupsBean.java │ │ │ │ ├── OrderBean.java │ │ │ │ ├── OrderDetailBean.java │ │ │ │ ├── OrderJMSManager.java │ │ │ │ ├── OrderStatusBean.java │ │ │ │ ├── ProductBean.java │ │ │ │ ├── ShoppingCart.java │ │ │ │ └── UserBean.java │ │ │ │ ├── exception │ │ │ │ ├── CustomExceptionHandler.java │ │ │ │ └── CustomExceptionHandlerFactory.java │ │ │ │ ├── handlers │ │ │ │ ├── DeliveryHandler.java │ │ │ │ ├── IOrderHandler.java │ │ │ │ └── PaymentHandler.java │ │ │ │ ├── qualifiers │ │ │ │ ├── LoggedIn.java │ │ │ │ ├── New.java │ │ │ │ └── Paid.java │ │ │ │ └── web │ │ │ │ ├── AdministratorController.java │ │ │ │ ├── CategoryController.java │ │ │ │ ├── CustomerController.java │ │ │ │ ├── CustomerOrderController.java │ │ │ │ ├── GroupsController.java │ │ │ │ ├── LocaleBean.java │ │ │ │ ├── OrderDetailController.java │ │ │ │ ├── OrderStatusController.java │ │ │ │ ├── ProductController.java │ │ │ │ ├── UserController.java │ │ │ │ └── util │ │ │ │ ├── AbstractPaginationHelper.java │ │ │ │ ├── ImageServlet.java │ │ │ │ ├── JsfUtil.java │ │ │ │ ├── MD5Util.java │ │ │ │ └── PageNavigation.java │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── faces-config.xml │ │ │ ├── glassfish-web.xml │ │ │ └── web.xml │ │ │ ├── admin │ │ │ ├── administrator │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── category │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── customer │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ ├── Profile.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── groups │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── index.xhtml │ │ │ ├── order │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── orderDetail │ │ │ │ └── View_popup.xhtml │ │ │ └── product │ │ │ │ ├── Confirm.xhtml │ │ │ │ ├── Create.xhtml │ │ │ │ ├── Edit.xhtml │ │ │ │ ├── List.xhtml │ │ │ │ └── View.xhtml │ │ │ ├── customer │ │ │ ├── Create.xhtml │ │ │ ├── Edit.xhtml │ │ │ ├── List.xhtml │ │ │ ├── Profile.xhtml │ │ │ └── View.xhtml │ │ │ ├── error.xhtml │ │ │ ├── index.xhtml │ │ │ ├── left.xhtml │ │ │ ├── login.xhtml │ │ │ ├── order │ │ │ ├── Create.xhtml │ │ │ ├── List.xhtml │ │ │ ├── MyOrders.xhtml │ │ │ └── View.xhtml │ │ │ ├── orderDetail │ │ │ └── View_popup.xhtml │ │ │ ├── product │ │ │ ├── List.xhtml │ │ │ ├── ListCategory.xhtml │ │ │ └── View.xhtml │ │ │ ├── template.xhtml │ │ │ ├── top.xhtml │ │ │ └── topbar.xhtml │ ├── entities │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── forest │ │ │ │ └── entity │ │ │ │ ├── Administrator.java │ │ │ │ ├── Category.java │ │ │ │ ├── Customer.java │ │ │ │ ├── CustomerOrder.java │ │ │ │ ├── Groups.java │ │ │ │ ├── OrderDetail.java │ │ │ │ ├── OrderDetailPK.java │ │ │ │ ├── OrderStatus.java │ │ │ │ ├── Person.java │ │ │ │ └── Product.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── persistence.xml │ │ │ └── sql │ │ │ ├── create.sql │ │ │ ├── data.sql │ │ │ ├── drop.sql │ │ │ ├── dukes-forest-model.mwb │ │ │ └── products.del │ ├── events │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── forest │ │ │ └── events │ │ │ └── OrderEvent.java │ └── pom.xml ├── dukes-tutoring │ ├── dukes-tutoring-common │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── dukestutoring │ │ │ │ ├── entity │ │ │ │ ├── Address.java │ │ │ │ ├── Administrator.java │ │ │ │ ├── Guardian.java │ │ │ │ ├── Person.java │ │ │ │ ├── PersonDetails.java │ │ │ │ ├── StatusEntry.java │ │ │ │ ├── Student.java │ │ │ │ └── TutoringSession.java │ │ │ │ └── util │ │ │ │ ├── CalendarUtil.java │ │ │ │ ├── Email.java │ │ │ │ └── StatusType.java │ │ │ └── resources │ │ │ ├── META-INF │ │ │ └── persistence.xml │ │ │ └── javaeetutorial │ │ │ └── dukestutoring │ │ │ └── util │ │ │ ├── StatusMessages.properties │ │ │ ├── StatusMessages_de.properties │ │ │ ├── StatusMessages_es.properties │ │ │ ├── StatusMessages_pt.properties │ │ │ └── StatusMessages_zh.properties │ ├── dukes-tutoring-war │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── dukestutoring │ │ │ │ ├── ejb │ │ │ │ ├── AdminBean.java │ │ │ │ ├── ConfigBean.java │ │ │ │ └── RequestBean.java │ │ │ │ ├── events │ │ │ │ └── StatusEvent.java │ │ │ │ └── web │ │ │ │ ├── AddressBean.java │ │ │ │ ├── AdminManager.java │ │ │ │ ├── GuardianBean.java │ │ │ │ ├── LocaleBean.java │ │ │ │ ├── StatusManager.java │ │ │ │ ├── StudentBean.java │ │ │ │ ├── util │ │ │ │ ├── EntityConverter.java │ │ │ │ ├── GuardianConverter.java │ │ │ │ └── StudentConverter.java │ │ │ │ └── websocket │ │ │ │ └── StatusEndpoint.java │ │ │ ├── resources │ │ │ ├── ValidationMessages.properties │ │ │ ├── ValidationMessages_de.properties │ │ │ ├── ValidationMessages_es.properties │ │ │ ├── ValidationMessages_pt.properties │ │ │ ├── ValidationMessages_zh.properties │ │ │ └── javaeetutorial │ │ │ │ └── dukestutoring │ │ │ │ └── web │ │ │ │ └── messages │ │ │ │ ├── Messages.properties │ │ │ │ ├── Messages_de.properties │ │ │ │ ├── Messages_es.properties │ │ │ │ ├── Messages_pt.properties │ │ │ │ └── Messages_zh.properties │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── faces-config.xml │ │ │ ├── glassfish-web.xml │ │ │ ├── includes │ │ │ │ ├── adminNav.xhtml │ │ │ │ ├── adminTop.xhtml │ │ │ │ └── mainNav.xhtml │ │ │ └── web.xml │ │ │ ├── admin │ │ │ ├── address │ │ │ │ ├── createAddress.xhtml │ │ │ │ ├── deleteAddress.xhtml │ │ │ │ └── editAddress.xhtml │ │ │ ├── adminTemplate.xhtml │ │ │ ├── guardian │ │ │ │ ├── createGuardian.xhtml │ │ │ │ ├── deleteGuardian.xhtml │ │ │ │ └── editGuardian.xhtml │ │ │ ├── index.xhtml │ │ │ └── student │ │ │ │ ├── activateStudent.xhtml │ │ │ │ ├── createStudent.xhtml │ │ │ │ ├── deleteStudent.xhtml │ │ │ │ ├── details.xhtml │ │ │ │ └── editStudent.xhtml │ │ │ ├── current.xhtml │ │ │ ├── error.xhtml │ │ │ ├── index.xhtml │ │ │ ├── login.xhtml │ │ │ ├── loginError.xhtml │ │ │ ├── park.xhtml │ │ │ ├── resources │ │ │ ├── components │ │ │ │ ├── addExistingGuardian.xhtml │ │ │ │ ├── allInactiveStudentsTable.xhtml │ │ │ │ ├── allStudentsTable.xhtml │ │ │ │ ├── changeStudent.xhtml │ │ │ │ ├── currentSessionTable.xhtml │ │ │ │ ├── formLogin.xhtml │ │ │ │ ├── parkTable.xhtml │ │ │ │ └── showGuardians.xhtml │ │ │ └── css │ │ │ │ ├── cssLayout.css │ │ │ │ └── default.css │ │ │ ├── statusEntries.xhtml │ │ │ └── template.xhtml │ └── pom.xml └── pom.xml ├── cdi ├── billpayment │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── billpayment │ │ │ ├── event │ │ │ └── PaymentEvent.java │ │ │ ├── interceptor │ │ │ ├── Logged.java │ │ │ └── LoggedInterceptor.java │ │ │ ├── listener │ │ │ └── PaymentHandler.java │ │ │ └── payment │ │ │ ├── Credit.java │ │ │ ├── Debit.java │ │ │ └── PaymentBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── default.css │ │ └── response.xhtml ├── decorators │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── decorators │ │ │ ├── Coder.java │ │ │ ├── CoderBean.java │ │ │ ├── CoderDecorator.java │ │ │ ├── CoderImpl.java │ │ │ ├── Logged.java │ │ │ └── LoggedInterceptor.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── encoder │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── encoder │ │ │ ├── Coder.java │ │ │ ├── CoderBean.java │ │ │ ├── CoderImpl.java │ │ │ └── TestCoderImpl.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── guessnumber-cdi │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── guessnumber │ │ │ ├── Generator.java │ │ │ ├── MaxNumber.java │ │ │ ├── Random.java │ │ │ └── UserNumberBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── default.css │ │ └── template.xhtml ├── pom.xml ├── producerfields │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── producerfields │ │ │ ├── db │ │ │ ├── UserDatabase.java │ │ │ └── UserDatabaseEntityManager.java │ │ │ ├── ejb │ │ │ └── RequestBean.java │ │ │ ├── entity │ │ │ └── ToDo.java │ │ │ └── web │ │ │ └── ListBean.java │ │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── default.css │ │ └── todolist.xhtml ├── producermethods │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── producermethods │ │ │ ├── Chosen.java │ │ │ ├── Coder.java │ │ │ ├── CoderBean.java │ │ │ ├── CoderImpl.java │ │ │ └── TestCoderImpl.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ └── css │ │ └── default.css └── simplegreeting │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── simplegreeting │ │ ├── Greeting.java │ │ ├── Informal.java │ │ ├── InformalGreeting.java │ │ ├── Printer.java │ │ └── UserBean.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.xhtml │ ├── resources │ └── css │ │ └── default.css │ └── template.xhtml ├── common ├── admin-password.txt └── license.txt ├── concurrency ├── jobs │ ├── nb-configuration.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── concurrency │ │ │ └── jobs │ │ │ ├── client │ │ │ └── JobClient.java │ │ │ └── service │ │ │ ├── JobService.java │ │ │ └── TokenStore.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── pom.xml └── taskcreator │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── taskcreator │ │ ├── InfoEndpoint.java │ │ ├── JAXRSApplication.java │ │ ├── Task.java │ │ ├── TaskCreatorBean.java │ │ └── TaskEJB.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.xhtml │ └── resources │ └── css │ └── default.css ├── connectors ├── pom.xml ├── trading │ ├── pom.xml │ ├── trading-ear │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── application │ │ │ └── META-INF │ │ │ │ ├── MANIFEST.MF │ │ │ │ └── application.xml │ │ │ └── resources │ │ │ └── empty │ ├── trading-eis │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── javaeetutorial │ │ │ │ │ └── trading │ │ │ │ │ └── eis │ │ │ │ │ ├── TradeExecServer.java │ │ │ │ │ └── TradeProcessor.java │ │ │ └── resources │ │ │ │ └── .gitkeep │ │ │ └── test │ │ │ └── java │ │ │ └── .gitkeep │ ├── trading-rar │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── trading │ │ │ │ └── rar │ │ │ │ ├── TradeResourceAdapter.java │ │ │ │ ├── api │ │ │ │ ├── TradeConnection.java │ │ │ │ ├── TradeConnectionFactory.java │ │ │ │ ├── TradeOrder.java │ │ │ │ ├── TradeProcessingException.java │ │ │ │ └── TradeResponse.java │ │ │ │ └── outbound │ │ │ │ ├── TradeConnectionFactoryImpl.java │ │ │ │ ├── TradeConnectionImpl.java │ │ │ │ ├── TradeManagedConnection.java │ │ │ │ └── TradeManagedConnectionFactory.java │ │ │ └── resources │ │ │ └── .gitkeep │ └── trading-war │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── trading │ │ │ └── war │ │ │ └── ResourceAccessBean.java │ │ ├── resources │ │ └── .gitkeep │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── default.css │ │ └── trade.xhtml └── traffic │ ├── pom.xml │ ├── traffic-ear │ ├── pom.xml │ └── src │ │ └── main │ │ ├── application │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application.xml │ │ └── resources │ │ └── empty │ ├── traffic-eis │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── traffic │ │ │ └── eis │ │ │ ├── TrafficServer.java │ │ │ └── TrafficService.java │ │ └── resources │ │ └── .gitkeep │ ├── traffic-ejb │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── trafficmdb │ │ │ └── TrafficMdb.java │ │ └── resources │ │ └── META-INF │ │ └── glassfish-ejb-jar.xml │ ├── traffic-rar │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── traffic │ │ │ └── rar │ │ │ ├── TrafficResourceAdapter.java │ │ │ ├── api │ │ │ ├── TrafficCommand.java │ │ │ └── TrafficListener.java │ │ │ └── inbound │ │ │ ├── ObtainEndpointWork.java │ │ │ ├── TrafficActivationSpec.java │ │ │ └── TrafficServiceSubscriber.java │ │ └── resources │ │ └── META-INF │ │ └── .gitkeep │ └── traffic-war │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── traffic │ │ └── war │ │ ├── TrafficEndpoint.java │ │ └── WebMDB.java │ ├── resources │ └── .gitkeep │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.html │ └── resources │ └── css │ └── default.css ├── ejb ├── async │ ├── async-smtpd │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── javaeetutorial │ │ │ │ │ └── asyncsmtpd │ │ │ │ │ └── Server.java │ │ │ └── resources │ │ │ │ └── .gitkeep │ │ │ └── test │ │ │ └── java │ │ │ └── .gitkeep │ ├── async-war │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── async │ │ │ │ ├── ejb │ │ │ │ └── MailerBean.java │ │ │ │ └── web │ │ │ │ └── MailerManagedBean.java │ │ │ ├── setup │ │ │ └── .gitkeep │ │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── index.xhtml │ │ │ ├── resources │ │ │ └── css │ │ │ │ ├── cssLayout.css │ │ │ │ └── default.css │ │ │ ├── response.xhtml │ │ │ └── template.xhtml │ └── pom.xml ├── cart │ ├── cart-appclient │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── cart │ │ │ │ └── client │ │ │ │ └── CartClient.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ ├── cart-common │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── javaeetutorial │ │ │ └── cart │ │ │ ├── ejb │ │ │ └── Cart.java │ │ │ └── util │ │ │ ├── BookException.java │ │ │ └── IdVerifier.java │ ├── cart-ear │ │ ├── nbactions.xml │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── application │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── resources │ │ │ └── empty │ ├── cart-ejb │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── cart │ │ │ │ └── ejb │ │ │ │ └── CartBean.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ └── pom.xml ├── converter │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── converter │ │ │ ├── ejb │ │ │ └── ConverterBean.java │ │ │ └── web │ │ │ └── ConverterServlet.java │ │ ├── resources │ │ └── .gitkeep │ │ └── webapp │ │ └── WEB-INF │ │ └── .gitkeep ├── counter │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── counter │ │ │ ├── ejb │ │ │ └── CounterBean.java │ │ │ └── web │ │ │ └── Count.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── default.css │ │ └── template.xhtml ├── helloservice │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── helloservice │ │ │ └── ejb │ │ │ └── HelloServiceBean.java │ │ └── resources │ │ └── META-INF │ │ └── MANIFEST.MF ├── interceptor │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── interceptor │ │ │ └── ejb │ │ │ ├── HelloBean.java │ │ │ └── HelloInterceptor.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ └── response.xhtml ├── pom.xml ├── standalone │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── standalone │ │ │ │ └── ejb │ │ │ │ └── StandaloneBean.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ │ └── test │ │ └── java │ │ └── javaeetutorial │ │ └── standalone │ │ └── ejb │ │ └── StandaloneBeanTest.java └── timersession │ ├── nbactions.xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── timersession │ │ ├── ejb │ │ └── TimerSessionBean.java │ │ └── web │ │ └── TimerManager.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── timer-client.xhtml │ └── timer.xhtml ├── jaxrs ├── customer │ ├── faces-config.NavData │ ├── nb-configuration.xml │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── customer │ │ │ │ ├── data │ │ │ │ ├── Address.java │ │ │ │ └── Customer.java │ │ │ │ ├── ejb │ │ │ │ ├── CustomerBean.java │ │ │ │ └── CustomerManager.java │ │ │ │ └── resource │ │ │ │ ├── CustomerApplication.java │ │ │ │ └── CustomerService.java │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── persistence.xml │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ ├── faces-config.xml │ │ │ └── web.xml │ │ │ ├── error.xhtml │ │ │ ├── index.xhtml │ │ │ └── list.xhtml │ │ └── test │ │ └── java │ │ └── .gitkeep ├── hello │ ├── nb-configuration.xml │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── hello │ │ ├── HelloApplication.java │ │ └── HelloWorld.java ├── pom.xml └── rsvp │ ├── faces-config.NavData │ ├── nb-configuration.xml │ ├── nbactions.xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── rsvp │ │ ├── ejb │ │ ├── ConfigBean.java │ │ ├── ResponseBean.java │ │ └── StatusBean.java │ │ ├── entity │ │ ├── Event.java │ │ ├── Person.java │ │ └── Response.java │ │ ├── rest │ │ └── RsvpApplication.java │ │ ├── util │ │ └── ResponseEnum.java │ │ └── web │ │ ├── EventManager.java │ │ └── StatusManager.java │ ├── resources │ └── META-INF │ │ └── persistence.xml │ └── webapp │ ├── WEB-INF │ ├── faces-config.xml │ └── web.xml │ ├── attendee.xhtml │ ├── event.xhtml │ ├── index.xhtml │ └── resources │ └── css │ └── default.css ├── jaxws ├── hello-appclient │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── hello │ │ └── appclient │ │ └── HelloAppClient.java ├── hello-webclient │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello │ │ │ └── webclient │ │ │ └── HelloServlet.java │ │ └── webapp │ │ └── WEB-INF │ │ └── jax-ws-catalog.xml ├── helloservice-war │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── helloservice │ │ │ └── Hello.java │ │ ├── resources │ │ └── .gitkeep │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml └── pom.xml ├── jms ├── clientmdbentity │ ├── clientmdbentity-appclient │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── clientmdbentity │ │ │ │ └── appclient │ │ │ │ └── HumanResourceClient.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ ├── clientmdbentity-ear │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── application │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── resources │ │ │ └── empty │ ├── clientmdbentity-ejb │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── clientmdbentity │ │ │ │ └── eb │ │ │ │ ├── EquipmentMDB.java │ │ │ │ ├── OfficeMDB.java │ │ │ │ └── SetupOffice.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── persistence.xml │ └── pom.xml ├── clientsessionmdb │ ├── clientsessionmdb-appclient │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── clientsessionmdb │ │ │ │ └── appclient │ │ │ │ └── MyAppClient.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ ├── clientsessionmdb-ear │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── .gitkeep │ │ │ └── resources │ │ │ └── empty │ ├── clientsessionmdb-ejb │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── clientsessionmdb │ │ │ │ ├── mdb │ │ │ │ └── MessageBean.java │ │ │ │ └── sb │ │ │ │ ├── PublisherBean.java │ │ │ │ └── PublisherRemote.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ └── pom.xml ├── durablesubscriptionexample │ ├── durableconsumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── durableconsumer │ │ │ │ ├── DurableConsumer.java │ │ │ │ └── TextListener.java │ │ │ └── setup │ │ │ └── glassfish-resources.xml │ ├── pom.xml │ └── unsubscriber │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── unsubscriber │ │ └── Unsubscriber.java ├── pom.xml ├── shared │ ├── pom.xml │ ├── sharedconsumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── sharedconsumer │ │ │ │ ├── SharedConsumer.java │ │ │ │ └── TextListener.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ └── shareddurableconsumer │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── shareddurableconsumer │ │ │ ├── SharedDurableConsumer.java │ │ │ └── TextListener.java │ │ └── resources │ │ └── META-INF │ │ ├── MANIFEST.MF │ │ └── application-client.xml ├── simple │ ├── asynchconsumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── asynchconsumer │ │ │ │ ├── AsynchConsumer.java │ │ │ │ └── TextListener.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── clientackconsumer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── clientackconsumer │ │ │ │ └── ClientAckConsumer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── messagebrowser │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── messagebrowser │ │ │ │ └── MessageBrowser.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── pom.xml │ ├── producer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── producer │ │ │ │ └── Producer.java │ │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── setup │ │ │ └── glassfish-resources.xml │ └── synchconsumer │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── synchconsumer │ │ │ └── SynchConsumer.java │ │ └── resources │ │ └── META-INF │ │ └── MANIFEST.MF ├── simplemessage │ ├── pom.xml │ ├── simplemessage-appclient │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── simplemessage │ │ │ │ └── appclient │ │ │ │ └── SimpleMessageClient.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ ├── simplemessage-ear │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── application │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── resources │ │ │ └── empty │ └── simplemessage-ejb │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── simplemessage │ │ │ └── ejb │ │ │ └── SimpleMessageBean.java │ │ └── resources │ │ └── META-INF │ │ └── MANIFEST.MF ├── transactedexample │ ├── genericsupplier │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── genericsupplier │ │ │ │ └── GenericSupplier.java │ │ │ ├── resources │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── setup │ │ │ └── glassfish-resources.xml │ ├── pom.xml │ ├── retailer │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── retailer │ │ │ │ └── Retailer.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ └── vendor │ │ ├── pom.xml │ │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── vendor │ │ │ ├── Order.java │ │ │ ├── SampleUtilities.java │ │ │ ├── Vendor.java │ │ │ └── VendorMessageListener.java │ │ └── resources │ │ └── META-INF │ │ └── MANIFEST.MF └── websimplemessage │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── websimplemessage │ │ ├── ReceiverBean.java │ │ └── SenderBean.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── receiver.xhtml │ ├── resources │ ├── css │ │ └── default.css │ └── images │ │ └── duke.waving.gif │ └── sender.xhtml ├── persistence ├── address-book │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── addressbook │ │ │ ├── ejb │ │ │ ├── AbstractFacade.java │ │ │ └── ContactFacade.java │ │ │ ├── entity │ │ │ └── Contact.java │ │ │ └── web │ │ │ ├── ContactController.java │ │ │ └── util │ │ │ ├── JsfUtil.java │ │ │ └── PaginationHelper.java │ │ ├── resources │ │ ├── Bundle.properties │ │ ├── META-INF │ │ │ └── persistence.xml │ │ └── ValidationMessages.properties │ │ └── webapp │ │ ├── WEB-INF │ │ ├── faces-config.xml │ │ └── web.xml │ │ ├── contact │ │ ├── Create.xhtml │ │ ├── Edit.xhtml │ │ ├── List.xhtml │ │ └── View.xhtml │ │ ├── index.xhtml │ │ ├── resources │ │ └── css │ │ │ └── jsfcrud.css │ │ └── template.xhtml ├── order │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── order │ │ │ ├── ejb │ │ │ ├── ConfigBean.java │ │ │ └── RequestBean.java │ │ │ ├── entity │ │ │ ├── CustomerOrder.java │ │ │ ├── LineItem.java │ │ │ ├── LineItemKey.java │ │ │ ├── Part.java │ │ │ ├── PartKey.java │ │ │ ├── Vendor.java │ │ │ └── VendorPart.java │ │ │ └── web │ │ │ └── OrderManager.java │ │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── lineItem-template.xhtml │ │ ├── lineItem.xhtml │ │ ├── order-template.xhtml │ │ ├── order.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── pom.xml └── roster │ ├── pom.xml │ ├── roster-appclient │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── roster │ │ │ └── client │ │ │ └── RosterClient.java │ │ └── resources │ │ └── META-INF │ │ ├── MANIFEST.MF │ │ └── application-client.xml │ ├── roster-common │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── roster │ │ ├── request │ │ └── Request.java │ │ └── util │ │ ├── IncorrectSportException.java │ │ ├── LeagueDetails.java │ │ ├── PlayerDetails.java │ │ └── TeamDetails.java │ ├── roster-ear │ ├── nb-configuration.xml │ ├── nbactions.xml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── application │ │ └── META-INF │ │ │ └── MANIFEST.MF │ │ └── resources │ │ └── empty │ └── roster-ejb │ ├── nb-configuration.xml │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── roster │ │ ├── entity │ │ ├── League.java │ │ ├── Player.java │ │ ├── SummerLeague.java │ │ ├── Team.java │ │ └── WinterLeague.java │ │ └── request │ │ └── RequestBean.java │ └── resources │ └── META-INF │ ├── MANIFEST.MF │ └── persistence.xml ├── pom.xml ├── release.sh ├── security ├── cart-secure │ ├── cart-secure-appclient │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── cartsecure │ │ │ │ └── client │ │ │ │ └── CartClient.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ ├── MANIFEST.MF │ │ │ └── application-client.xml │ ├── cart-secure-common │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── javaeetutorial │ │ │ └── cartsecure │ │ │ ├── ejb │ │ │ └── Cart.java │ │ │ └── util │ │ │ ├── BookException.java │ │ │ └── IdVerifier.java │ ├── cart-secure-ear │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── application │ │ │ └── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── resources │ │ │ └── empty │ ├── cart-secure-ejb │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── cartsecure │ │ │ │ └── ejb │ │ │ │ └── CartBean.java │ │ │ └── resources │ │ │ └── META-INF │ │ │ └── MANIFEST.MF │ └── pom.xml ├── converter-secure │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── convertersecure │ │ ├── ejb │ │ └── ConverterBean.java │ │ └── web │ │ └── ConverterServlet.java ├── hello1-formauth │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello1_formauth │ │ │ └── Hello.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── error.html │ │ ├── index.xhtml │ │ ├── login.html │ │ ├── resources │ │ └── images │ │ │ └── duke.waving.gif │ │ └── response.xhtml ├── hello2-basicauth │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello2_basicauth │ │ │ ├── GreetingServlet.java │ │ │ └── ResponseServlet.java │ │ └── webapp │ │ └── resources │ │ └── images │ │ └── duke.waving.gif ├── pom.xml └── security-api │ ├── built-in-db-identity-store │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── built_in_db_identity_store │ │ ├── ApplicationConfig.java │ │ ├── DatabaseSetup.java │ │ └── Servlet.java │ ├── custom-identity-store │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── javaeetutorial │ │ └── custom_identity_store │ │ ├── ApplicationConfig.java │ │ ├── Servlet.java │ │ └── TestIdentityStore.java │ └── pom.xml └── web ├── jsf ├── ajaxguessnumber │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── ajaxguessnumber │ │ │ ├── DukesNumberBean.java │ │ │ └── UserNumberBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── ajaxgreeting.xhtml │ │ └── resources │ │ ├── css │ │ └── default.css │ │ └── images │ │ └── wave.med.gif ├── bookmarks │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── bookmarks │ │ │ └── Hello.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── personal.xhtml │ │ ├── resources │ │ └── images │ │ │ └── duke.waving.gif │ │ └── response.xhtml ├── checkout-module │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── checkoutmodule │ │ │ ├── CheckoutBean.java │ │ │ ├── CheckoutFlow.java │ │ │ ├── CheckoutFlowBean.java │ │ │ └── JoinFlowBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ │ ├── checkoutFlow │ │ ├── checkoutFlow.xhtml │ │ ├── checkoutFlow2.xhtml │ │ ├── checkoutFlow3.xhtml │ │ └── checkoutFlow4.xhtml │ │ ├── exithome.xhtml │ │ ├── index.xhtml │ │ ├── joinFlow │ │ ├── joinFlow-flow.xml │ │ ├── joinFlow.xhtml │ │ └── joinFlow2.xhtml │ │ └── resources │ │ ├── css │ │ └── stylesheet.css │ │ └── images │ │ └── duke.books.gif ├── compositecomponentexample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── compositecomponentexample │ │ │ └── PrimeBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ └── resources │ │ ├── css │ │ └── default.css │ │ └── ezcomp │ │ └── PrimePanel.xhtml ├── guessnumber-jsf │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── guessnumber │ │ │ └── UserNumberBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── greeting.xhtml │ │ ├── resources │ │ ├── css │ │ │ └── default.css │ │ └── images │ │ │ └── wave.med.gif │ │ └── response.xhtml ├── hello1-rlc │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello1rlc │ │ │ └── Hello.java │ │ └── webapp │ │ ├── WEB-INF │ │ ├── faces-config.xml │ │ └── web.xml │ │ ├── contracts │ │ ├── hello │ │ │ ├── default.css │ │ │ ├── duke.handsOnHips.gif │ │ │ └── template.xhtml │ │ └── reply │ │ │ ├── default.css │ │ │ ├── duke.thumbsup.gif │ │ │ └── template.xhtml │ │ ├── greeting.xhtml │ │ └── reply │ │ └── response.xhtml ├── hello1 │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello1 │ │ │ └── Hello.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── resources │ │ └── images │ │ │ └── duke.waving.gif │ │ └── response.xhtml ├── pom.xml ├── reservation │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── reservation │ │ │ └── ReservationBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── confirmation.xhtml │ │ ├── reservation.xhtml │ │ └── resources │ │ └── css │ │ └── stylesheet.css └── simple-flow │ ├── pom.xml │ └── src │ └── main │ ├── resources │ └── empty │ └── webapp │ ├── WEB-INF │ ├── beans.xml │ └── web.xml │ ├── index.xhtml │ ├── simple-flow-return.xhtml │ └── simple-flow │ ├── simple-flow-flow.xml │ ├── simple-flow-page2.xhtml │ └── simple-flow.xhtml ├── jsonb ├── jsonbbasics │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── jsonbmodel │ │ │ ├── JsonbBean.java │ │ │ └── person │ │ │ ├── Person.java │ │ │ └── PhoneNumber.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── jsongenerated.xhtml │ │ └── resources │ │ └── css │ │ └── default.css └── pom.xml ├── jsonp ├── jsonpmodel │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── jsonpmodel │ │ │ └── ObjectModelBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── index.xhtml │ │ ├── modelcreated.xhtml │ │ ├── parsejson.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── jsonpstreaming │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── javaeetutorial │ │ │ │ └── jsonpstreaming │ │ │ │ └── StreamingBean.java │ │ └── webapp │ │ │ ├── WEB-INF │ │ │ └── web.xml │ │ │ ├── filewritten.xhtml │ │ │ ├── index.xhtml │ │ │ ├── parsed.xhtml │ │ │ └── resources │ │ │ └── css │ │ │ └── default.css │ │ └── test │ │ └── java │ │ └── .gitkeep └── pom.xml ├── pom.xml ├── servlet ├── dukeetf │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── web │ │ │ └── dukeetf │ │ │ ├── DukeETFServlet.java │ │ │ └── PriceVolumeBean.java │ │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── main.xhtml │ │ └── resources │ │ └── css │ │ └── default.css ├── fileupload │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── fileupload │ │ │ └── FileUploadServlet.java │ │ ├── resources │ │ └── .gitkeep │ │ └── webapp │ │ ├── WEB-INF │ │ └── .gitkeep │ │ └── index.html ├── hello2 │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── hello2 │ │ │ ├── GreetingServlet.java │ │ │ └── ResponseServlet.java │ │ └── webapp │ │ └── resources │ │ └── images │ │ └── duke.waving.gif ├── mood │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── javaeetutorial │ │ │ └── mood │ │ │ ├── MoodServlet.java │ │ │ ├── SimpleServletListener.java │ │ │ └── TimeOfDayFilter.java │ │ ├── resources │ │ └── .gitkeep │ │ └── webapp │ │ ├── WEB-INF │ │ └── .gitkeep │ │ └── resources │ │ └── images │ │ ├── duke.cookies.gif │ │ ├── duke.handsOnHips.gif │ │ ├── duke.pensive.gif │ │ ├── duke.snooze.gif │ │ ├── duke.thumbsup.gif │ │ └── duke.waving.gif └── pom.xml └── websocket ├── dukeetf2 ├── pom.xml └── src │ └── main │ ├── java │ └── javaeetutorial │ │ └── web │ │ └── dukeetf2 │ │ ├── ETFEndpoint.java │ │ └── PriceVolumeBean.java │ ├── resources │ └── .gitkeep │ └── webapp │ ├── WEB-INF │ └── .gitkeep │ ├── index.html │ └── resources │ └── css │ └── default.css ├── pom.xml └── websocketbot ├── pom.xml └── src └── main ├── java └── javaeetutorial │ └── web │ └── websocketbot │ ├── BotBean.java │ ├── BotEndpoint.java │ ├── decoders │ └── MessageDecoder.java │ ├── encoders │ ├── ChatMessageEncoder.java │ ├── InfoMessageEncoder.java │ ├── JoinMessageEncoder.java │ └── UsersMessageEncoder.java │ └── messages │ ├── ChatMessage.java │ ├── InfoMessage.java │ ├── JoinMessage.java │ ├── Message.java │ └── UsersMessage.java ├── resources └── .gitkeep └── webapp ├── WEB-INF └── beans.xml ├── index.html └── resources └── css └── default.css /archetypes/jaxrs-service-archetype/src/main/resources/archetype-resources/src/main/java/HelloApplication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | #set( $symbol_pound = '#' ) 9 | #set( $symbol_dollar = '$' ) 10 | #set( $symbol_escape = '\' ) 11 | package ${package}; 12 | 13 | import javax.ws.rs.ApplicationPath; 14 | import javax.ws.rs.core.Application; 15 | 16 | /** 17 | * 18 | * @author ievans 19 | */ 20 | @ApplicationPath("/") 21 | public class HelloApplication extends Application { 22 | 23 | } 24 | -------------------------------------------------------------------------------- /archetypes/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.glassfish.javaeetutorial 4 | archetypes 5 | pom 6 | archetypes 7 | 8 | 9 | org.glassfish.javaeetutorial 10 | javaeetutorial 11 | 8.1-SNAPSHOT 12 | 13 | 14 | 15 | jaxrs-service-archetype 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /batch/phonebilling/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | batch 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial.batch 12 | phonebilling 13 | war 14 | 15 | phonebilling 16 | 17 | 18 | ${project.artifactId} 19 | 20 | 21 | -------------------------------------------------------------------------------- /batch/phonebilling/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | java:comp/DefaultDataSource 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /batch/webserverlog/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | batch 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial.batch 12 | webserverlog 13 | war 14 | 15 | webserverlog 16 | 17 | 18 | ${project.artifactId} 19 | 20 | 21 | -------------------------------------------------------------------------------- /batch/webserverlog/src/main/java/javaeetutorial/batch/webserverlog/ItemNumberCheckpoint.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.batch.webserverlog; 9 | 10 | import java.io.Serializable; 11 | 12 | /* Class for checkpoint objects. 13 | */ 14 | public class ItemNumberCheckpoint implements Serializable { 15 | 16 | private static final long serialVersionUID = -7455017703127938364L; 17 | private long lineNum; 18 | 19 | public ItemNumberCheckpoint() { 20 | lineNum = 0; 21 | } 22 | 23 | public long getLineNum() { 24 | return lineNum; 25 | } 26 | 27 | public void nextLine() { 28 | lineNum++; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /batch/webserverlog/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/batch/webserverlog/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /case-studies/.pom.xml.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/.pom.xml.swp -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/java/javaeetutorial/dukesbookstore/exception/BookNotFoundException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.dukesbookstore.exception; 9 | 10 | /** 11 | *

This application exception indicates that a book has not been found.

12 | */ 13 | public class BookNotFoundException extends Exception { 14 | 15 | private static final long serialVersionUID = 8712363279947073702L; 16 | 17 | public BookNotFoundException() { 18 | } 19 | 20 | public BookNotFoundException(String msg) { 21 | super(msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/java/javaeetutorial/dukesbookstore/exception/BooksNotFoundException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.dukesbookstore.exception; 9 | 10 | /** 11 | *

This application exception indicates that books have not been found.

12 | */ 13 | public class BooksNotFoundException extends Exception { 14 | 15 | private static final long serialVersionUID = 4156679691884326238L; 16 | 17 | public BooksNotFoundException() { 18 | } 19 | 20 | public BooksNotFoundException(String msg) { 21 | super(msg); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/java/javaeetutorial/dukesbookstore/exception/OrderException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.dukesbookstore.exception; 9 | 10 | /** 11 | *

This application exception indicates that an order cannot be 12 | * completed.

13 | */ 14 | public class OrderException extends Exception { 15 | 16 | private static final long serialVersionUID = -5058707185180716794L; 17 | 18 | public OrderException() { 19 | } 20 | 21 | public OrderException(String msg) { 22 | super(msg); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | org.eclipse.persistence.jpa.PersistenceProvider 8 | java:comp/DefaultDataSource 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/WEB-INF/bookstore.taglib.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | http://dukesbookstore 7 | 8 | area 9 | 10 | DemoArea 11 | DemoArea 12 | 13 | 14 | 15 | map 16 | 17 | DemoMap 18 | DemoMap 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_201.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_201.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_202.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_202.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_203.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_203.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_205.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_205.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_206.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_206.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_207.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_207.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/book_all.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/book_all.jpg -------------------------------------------------------------------------------- /case-studies/dukes-bookstore/src/main/webapp/resources/images/duke.books.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-bookstore/src/main/webapp/resources/images/duke.books.gif -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-payment/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /dukes-payment 5 | 6 | 7 | USERS 8 | USERS 9 | 10 | 11 | 12 | ADMINS 13 | ADMINS 14 | 15 | 16 | 17 | 18 | 19 | Keep a copy of the generated servlet class' java code. 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | dukes-forest 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | dukes-resources 12 | jar 13 | 14 | dukes-resources 15 | 16 | 17 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/java/.gitkeep -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/GreenThumbSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/GreenThumbSmall.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/JavaTopiary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/JavaTopiary.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/background.jpg -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/cart.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/cart.gif -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/empty_shopping_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/empty_shopping_cart.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/full_shopping_cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/full_shopping_cart.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/logo-small.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/refresh.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/tango_nature_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/tango_nature_icon.png -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/top-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/META-INF/resources/img/top-background.jpg -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/ValidationMessages_es.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/ValidationMessages_es.properties -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-resources/src/main/resources/bundles/Bundle_es.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/dukes-resources/src/main/resources/bundles/Bundle_es.properties -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-shipment/src/main/java/com/forest/qualifiers/LoggedIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.qualifiers; 9 | 10 | import static java.lang.annotation.ElementType.*; 11 | import java.lang.annotation.Retention; 12 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 13 | import java.lang.annotation.Target; 14 | import javax.inject.Qualifier; 15 | 16 | /** 17 | * 18 | * @author markito 19 | */ 20 | @Qualifier 21 | @Retention(RUNTIME) 22 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 23 | public @interface LoggedIn { 24 | } 25 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-shipment/src/main/webapp/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | bundles.Bundle 12 | bundle 13 | 14 | 15 | en 16 | es 17 | pt 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-shipment/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /dukes-shipment 5 | 6 | USERS 7 | USERS 8 | 9 | 10 | ADMINS 11 | ADMINS 12 | 13 | 14 | 15 | 16 | Keep a copy of the generated servlet class' java code. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-shipment/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 17 | 18 | 19 | Home 20 | 21 | 22 | 23 |

#{bundle.OnlyAuthorizedPersonnel}

24 |
25 |
26 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-shipment/src/main/webapp/top.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 15 | 16 | 17 | 18 |

#{bundle.TopTitleShipment}

19 |

#{bundle.TopSubTitle}

20 | 21 |
22 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/ejb/GroupsBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.ejb; 9 | 10 | import com.forest.entity.Groups; 11 | import javax.ejb.Stateless; 12 | import javax.persistence.EntityManager; 13 | import javax.persistence.PersistenceContext; 14 | 15 | /** 16 | * 17 | * @author ievans 18 | */ 19 | @Stateless 20 | public class GroupsBean extends AbstractFacade { 21 | @PersistenceContext(unitName = "forestPU") 22 | private EntityManager em; 23 | 24 | @Override 25 | protected EntityManager getEntityManager() { 26 | return em; 27 | } 28 | 29 | public GroupsBean() { 30 | super(Groups.class); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/handlers/IOrderHandler.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.handlers; 9 | 10 | import com.forest.events.OrderEvent; 11 | 12 | /** 13 | * 14 | * @author markito 15 | */ 16 | public interface IOrderHandler { 17 | 18 | public void onNewOrder(OrderEvent event); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/qualifiers/LoggedIn.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.qualifiers; 9 | 10 | import static java.lang.annotation.ElementType.*; 11 | import java.lang.annotation.Retention; 12 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 13 | import java.lang.annotation.Target; 14 | import javax.inject.Qualifier; 15 | 16 | /** 17 | * 18 | * @author markito 19 | */ 20 | @Qualifier 21 | @Retention(RUNTIME) 22 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 23 | public @interface LoggedIn { 24 | } 25 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/qualifiers/New.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.qualifiers; 9 | 10 | import static java.lang.annotation.ElementType.*; 11 | import java.lang.annotation.Retention; 12 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 13 | import java.lang.annotation.Target; 14 | import javax.inject.Qualifier; 15 | 16 | /** 17 | * 18 | * @author markito 19 | */ 20 | @Qualifier 21 | @Retention(RUNTIME) 22 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 23 | public @interface New { 24 | } 25 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/qualifiers/Paid.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.qualifiers; 9 | 10 | import static java.lang.annotation.ElementType.*; 11 | import java.lang.annotation.Retention; 12 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 13 | import java.lang.annotation.Target; 14 | import javax.inject.Qualifier; 15 | 16 | /** 17 | * 18 | * @author markito 19 | */ 20 | @Qualifier 21 | @Retention(RUNTIME) 22 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 23 | public @interface Paid { 24 | } 25 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/web/util/MD5Util.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.web.util; 9 | 10 | import java.math.BigInteger; 11 | import java.security.MessageDigest; 12 | import java.security.NoSuchAlgorithmException; 13 | 14 | /** 15 | * 16 | * @author markito 17 | */ 18 | public class MD5Util { 19 | 20 | public static String generateMD5(String value) { 21 | 22 | try { 23 | MessageDigest md = MessageDigest.getInstance("MD5"); 24 | byte[] messageDigest = md.digest(value.getBytes()); 25 | 26 | BigInteger number = new BigInteger(1, messageDigest); 27 | return number.toString(16); 28 | 29 | } catch (NoSuchAlgorithmException nsae) { 30 | return null; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/java/com/forest/web/util/PageNavigation.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package com.forest.web.util; 9 | 10 | /** 11 | * Simple ENUM to centralize strings for common navigation destinations 12 | * 13 | * @author markito 14 | */ 15 | public enum PageNavigation { 16 | 17 | CREATE("Create"), 18 | LIST("List"), 19 | EDIT("Edit"), 20 | VIEW("View"), 21 | INDEX("index"); 22 | private String text; 23 | 24 | PageNavigation(final String s) { 25 | this.text = s; 26 | } 27 | 28 | public String getText() { 29 | return this.text; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return this.text; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /dukes-store 5 | 6 | USERS 7 | USERS 8 | 9 | 10 | ADMINS 11 | ADMINS 12 | 13 | 14 | 15 | 16 | Keep a copy of the generated servlet class' java code. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/webapp/left.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 17 | 18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/dukes-store/src/main/webapp/top.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 14 | 15 | 16 | 17 |

#{bundle.TopTitle}

18 |

#{bundle.TopSubTitle}

19 | 20 |
21 | -------------------------------------------------------------------------------- /case-studies/dukes-forest/entities/src/main/resources/META-INF/sql/drop.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "FOREST"."PERSON_GROUPS" DROP CONSTRAINT FK_PERSON_GROUPS_PERSON 2 | ALTER TABLE "FOREST"."PERSON_GROUPS" DROP CONSTRAINT FK_PERSON_GROUPS_GROUPS 3 | ALTER TABLE "FOREST"."CUSTOMER_ORDER" DROP CONSTRAINT FK_CUSTOMER_ORDER_ORDER_STATUS1 4 | ALTER TABLE "FOREST"."CUSTOMER_ORDER" DROP CONSTRAINT FK_CUSTOMER_ORDER_CUSTOMER1 5 | ALTER TABLE "FOREST"."PRODUCT" DROP CONSTRAINT FK_PRODUCT_CATEGORY 6 | ALTER TABLE "FOREST"."ORDER_DETAIL" DROP CONSTRAINT FK_ORDER_DETAIL_PRODUCT 7 | ALTER TABLE "FOREST"."ORDER_DETAIL" DROP CONSTRAINT FK_ORDER_DETAIL_ORDER 8 | 9 | DROP TABLE "FOREST"."PERSON_GROUPS" 10 | DROP TABLE "FOREST"."PERSON" 11 | DROP TABLE "FOREST"."GROUPS" 12 | DROP TABLE "FOREST"."ORDER_DETAIL" 13 | DROP TABLE "FOREST"."CUSTOMER_ORDER" 14 | DROP TABLE "FOREST"."ORDER_STATUS" 15 | DROP TABLE "FOREST"."PRODUCT" 16 | DROP TABLE "FOREST"."CATEGORY" -------------------------------------------------------------------------------- /case-studies/dukes-forest/entities/src/main/resources/META-INF/sql/dukes-forest-model.mwb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/case-studies/dukes-forest/entities/src/main/resources/META-INF/sql/dukes-forest-model.mwb -------------------------------------------------------------------------------- /case-studies/dukes-forest/events/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | dukes-forest 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | events 12 | jar 13 | 14 | events 15 | 16 | 17 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/java/javaeetutorial/dukestutoring/util/CalendarUtil.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.dukestutoring.util; 9 | 10 | import java.util.Calendar; 11 | 12 | /** 13 | * 14 | * @author ian 15 | */ 16 | public class CalendarUtil { 17 | 18 | public CalendarUtil() { 19 | } 20 | 21 | public static void stripTime(final Calendar cal) { 22 | // remove all the time information 23 | cal.clear(Calendar.AM_PM); 24 | cal.clear(Calendar.HOUR_OF_DAY); 25 | cal.clear(Calendar.HOUR); 26 | cal.clear(Calendar.MINUTE); 27 | cal.clear(Calendar.SECOND); 28 | cal.clear(Calendar.MILLISECOND); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.eclipse.persistence.jpa.PersistenceProvider 5 | java:global/TutoringDataSource 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/javaeetutorial/dukestutoring/util/StatusMessages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # To change this template, choose Tools | Templates 10 | # and open the template in the editor. 11 | 12 | ###################### 13 | # StatusType strings # 14 | ###################### 15 | IN.string=In 16 | OUT.string=Out 17 | PARK.string=At park 18 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/javaeetutorial/dukestutoring/util/StatusMessages_de.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # To change this template, choose Tools | Templates 10 | # and open the template in the editor. 11 | 12 | ###################### 13 | # StatusType strings # 14 | ###################### 15 | IN.string=Ein 16 | OUT.string=Aus 17 | PARK.string=Im park 18 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/javaeetutorial/dukestutoring/util/StatusMessages_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # To change this template, choose Tools | Templates 10 | # and open the template in the editor. 11 | 12 | ###################### 13 | # StatusType strings # 14 | ###################### 15 | IN.string=Dentro 16 | OUT.string=Fuera 17 | PARK.string=En el parque 18 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/javaeetutorial/dukestutoring/util/StatusMessages_pt.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # To change this template, choose Tools | Templates 10 | # and open the template in the editor. 11 | 12 | ###################### 13 | # StatusType strings # 14 | ###################### 15 | IN.string=Dentro 16 | OUT.string=Fora 17 | PARK.string=No parque 18 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-common/src/main/resources/javaeetutorial/dukestutoring/util/StatusMessages_zh.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # To change this template, choose Tools | Templates 10 | # and open the template in the editor. 11 | 12 | ###################### 13 | # StatusType strings # 14 | ###################### 15 | IN.string=\u00c8\u00e1\u00e5 16 | OUT.string=\u00c2\u00a7\u00f1 17 | PARK.string=\u00c2\u00fa\u00ae\u00ca\u00ec\u00e7\u00c2\u00fa\u222b 18 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | 11 | invalid.phonenumber=Phone numbers should be of the form (xxx) xxx-xxxx. 12 | invalid.email=Invalid email address. 13 | invalid.zipcode=Invalid ZIP code. 14 | invalid.grade.level=Invalid grade level. 15 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/resources/ValidationMessages_de.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | 11 | invalid.phonenumber=Telefon Nummern sollten in der Form (xxx) xxx-xxxx. 12 | invalid.email=Ung\u00fcltige E-Mail Adresse. 13 | invalid.zipcode=Ung\u00fcltige Postleitzahl. 14 | invalid.grade.level=Ung\u00fcltige Klassenstufe. 15 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/resources/ValidationMessages_es.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | 11 | invalid.phonenumber=N\u00fameros telef\u00f3nicos deben ser entrados en este formato (xxx) xxx-xxxx. 12 | invalid.email=direcci\u00f3n de email invalida. 13 | invalid.zipcode=C\u00f3digo postal invalido. 14 | 15 | invalid.grade.level=Grado invalido. 16 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/resources/ValidationMessages_pt.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | 11 | invalid.phonenumber=N\u00c3\u00bamero de telefone deve ser no formato (xxx) xxx-xxxx. 12 | invalid.email=Endere\u00c3\u00a7o de e-mail inv\u00c3\u00a1lido. 13 | invalid.zipcode=C\u00c3\u00b3digo ZIP inv\u00c3\u00a1lido. 14 | invalid.grade.level=N\u00c3\u00advel escolar inv\u00c3\u00a1lido. 15 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/resources/ValidationMessages_zh.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | 11 | invalid.phonenumber=\u00c1\u00ee\u00b5\u00cb\u00d8\u00f9\u00c2\u00e8\u2211\u00c1\u2020\u00c5\u00ca\u2020\u00ba\u00c2\u00ba\u00e8\u00c2\u222b\u00ee\u2030\u220f\u222b (xxx) xxx-xxxx\u201e\u00c4\u00c7 12 | invalid.email=\u00c1\u00ee\u00b5\u00c2\u2260\u00ea\u00c8\u00c7\u00c6\u2030\u00aa\u2202\u00c2\u00fa\u221e\u00c2\u00f9\u00c4\u00ca\u00f3\u2020\u00ca\u00ef\u00e0\u201e\u00c4\u00c7 13 | invalid.zipcode=\u00c8\u00c7\u00c6\u00ca\u00ee\u00f8\u00c1\u00ba\u00f1\u00c1\u2020\u00c5\u00ca\u00f3\u2020\u00ca\u00ef\u00e0\u201e\u00c4\u00c7 14 | invalid.grade.level=\u00c2\u03c0\u00a5\u00c1\u222b\u00df\u00ca\u00f3\u2020\u00ca\u00ef\u00e0\u201e\u00c4\u00c7 15 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/WEB-INF/includes/adminNav.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | 15 | 16 |
17 | 18 |
19 | 20 |
21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/WEB-INF/includes/adminTop.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 |

#{bundle['dukes.tutoring.name']}: #{bundle['dukes.tutoring.admin']}

14 | 15 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/WEB-INF/includes/mainNav.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/admin/student/activateStudent.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/admin/student/details.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/error.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | Oh noes! 18 | 19 | 20 | 21 |

An error occurred

22 |
23 | 24 | 25 |

So sorry about that. Something bad happened.

26 |
27 | 28 |
29 | -------------------------------------------------------------------------------- /case-studies/dukes-tutoring/dukes-tutoring-war/src/main/webapp/login.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /case-studies/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.glassfish.javaeetutorial 7 | javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | case-studies 13 | pom 14 | 15 | case-studies 16 | 17 | 18 | dukes-bookstore 19 | dukes-forest 20 | dukes-tutoring 21 | 22 | 23 | 24 | ${project.artifactId} 25 | 26 | -------------------------------------------------------------------------------- /cdi/billpayment/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | cdi 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | billpayment 12 | war 13 | 14 | billpayment 15 | 16 | -------------------------------------------------------------------------------- /cdi/billpayment/src/main/java/javaeetutorial/billpayment/interceptor/Logged.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.billpayment.interceptor; 9 | 10 | import static java.lang.annotation.ElementType.METHOD; 11 | import static java.lang.annotation.ElementType.TYPE; 12 | import java.lang.annotation.Inherited; 13 | import java.lang.annotation.Retention; 14 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 15 | import java.lang.annotation.Target; 16 | import javax.interceptor.InterceptorBinding; 17 | 18 | @Inherited 19 | @InterceptorBinding 20 | @Retention(RUNTIME) 21 | @Target({METHOD, TYPE}) 22 | public @interface Logged { 23 | } 24 | -------------------------------------------------------------------------------- /cdi/billpayment/src/main/java/javaeetutorial/billpayment/payment/Credit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.billpayment.payment; 9 | 10 | import static java.lang.annotation.ElementType.FIELD; 11 | import static java.lang.annotation.ElementType.METHOD; 12 | import static java.lang.annotation.ElementType.PARAMETER; 13 | import static java.lang.annotation.ElementType.TYPE; 14 | import java.lang.annotation.Retention; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | import java.lang.annotation.Target; 17 | import javax.inject.Qualifier; 18 | 19 | /** 20 | * Qualifier for Credit payment events. 21 | */ 22 | @Qualifier 23 | @Retention(RUNTIME) 24 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 25 | public @interface Credit { 26 | } 27 | -------------------------------------------------------------------------------- /cdi/billpayment/src/main/java/javaeetutorial/billpayment/payment/Debit.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.billpayment.payment; 9 | 10 | import static java.lang.annotation.ElementType.FIELD; 11 | import static java.lang.annotation.ElementType.METHOD; 12 | import static java.lang.annotation.ElementType.PARAMETER; 13 | import static java.lang.annotation.ElementType.TYPE; 14 | import java.lang.annotation.Retention; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | import java.lang.annotation.Target; 17 | import javax.inject.Qualifier; 18 | 19 | /** 20 | * Qualifier for Debit payment events. 21 | */ 22 | @Qualifier 23 | @Retention(RUNTIME) 24 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 25 | public @interface Debit { 26 | } 27 | -------------------------------------------------------------------------------- /cdi/billpayment/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | javaeetutorial.billpayment.interceptor.LoggedInterceptor 8 | 9 | 10 | -------------------------------------------------------------------------------- /cdi/decorators/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | cdi 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | decorators 13 | war 14 | 15 | decorators 16 | 17 | -------------------------------------------------------------------------------- /cdi/decorators/src/main/java/javaeetutorial/decorators/Coder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.decorators; 9 | 10 | public interface Coder { 11 | 12 | public String codeString(String s, int tval); 13 | } 14 | -------------------------------------------------------------------------------- /cdi/decorators/src/main/java/javaeetutorial/decorators/CoderDecorator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.decorators; 9 | 10 | import javax.decorator.Decorator; 11 | import javax.decorator.Delegate; 12 | import javax.enterprise.inject.Any; 13 | import javax.inject.Inject; 14 | 15 | @Decorator 16 | public abstract class CoderDecorator implements Coder { 17 | 18 | @Inject 19 | @Delegate 20 | @Any 21 | Coder coder; 22 | 23 | @Override 24 | public String codeString(String s, int tval) { 25 | int len = s.length(); 26 | 27 | return "\"" + s + "\" becomes " + "\"" + coder.codeString(s, tval) 28 | + "\", " + len + " characters in length"; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cdi/decorators/src/main/java/javaeetutorial/decorators/Logged.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.decorators; 9 | 10 | import static java.lang.annotation.ElementType.METHOD; 11 | import static java.lang.annotation.ElementType.TYPE; 12 | import java.lang.annotation.Inherited; 13 | import java.lang.annotation.Retention; 14 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 15 | import java.lang.annotation.Target; 16 | import javax.interceptor.InterceptorBinding; 17 | 18 | @Inherited 19 | @InterceptorBinding 20 | @Retention(RUNTIME) 21 | @Target({METHOD, TYPE}) 22 | public @interface Logged { 23 | } 24 | -------------------------------------------------------------------------------- /cdi/decorators/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | javaeetutorial.decorators.CoderDecorator 8 | 9 | 10 | javaeetutorial.decorators.LoggedInterceptor 11 | 12 | 13 | -------------------------------------------------------------------------------- /cdi/encoder/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | cdi 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | encoder 13 | war 14 | 15 | encoder 16 | 17 | -------------------------------------------------------------------------------- /cdi/encoder/src/main/java/javaeetutorial/encoder/Coder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.encoder; 9 | 10 | public interface Coder { 11 | 12 | public String codeString(String s, int tval); 13 | } 14 | -------------------------------------------------------------------------------- /cdi/encoder/src/main/java/javaeetutorial/encoder/TestCoderImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.encoder; 9 | 10 | import javax.enterprise.inject.Alternative; 11 | 12 | /** 13 | * Coder implementation that does nothing but display the values of the 14 | * arguments. 15 | */ 16 | @Alternative 17 | public class TestCoderImpl implements Coder { 18 | 19 | /** 20 | * Returns a string that displays the values of the arguments. 21 | * 22 | * @param s the input string 23 | * @param tval the number of characters to shift 24 | * @return string displaying argument values 25 | */ 26 | @Override 27 | public String codeString(String s, int tval) { 28 | return ("input string is " + s + ", shift value is " + tval); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cdi/encoder/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /cdi/guessnumber-cdi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | cdi 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | guessnumber-cdi 12 | war 13 | 14 | guessnumber-cdi 15 | 16 | -------------------------------------------------------------------------------- /cdi/guessnumber-cdi/src/main/java/javaeetutorial/guessnumber/MaxNumber.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.guessnumber; 9 | 10 | import java.lang.annotation.Documented; 11 | import static java.lang.annotation.ElementType.FIELD; 12 | import static java.lang.annotation.ElementType.METHOD; 13 | import static java.lang.annotation.ElementType.PARAMETER; 14 | import static java.lang.annotation.ElementType.TYPE; 15 | import java.lang.annotation.Retention; 16 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 17 | import java.lang.annotation.Target; 18 | import javax.inject.Qualifier; 19 | 20 | @Target({TYPE, METHOD, PARAMETER, FIELD}) 21 | @Retention(RUNTIME) 22 | @Documented 23 | @Qualifier 24 | public @interface MaxNumber { 25 | } 26 | -------------------------------------------------------------------------------- /cdi/guessnumber-cdi/src/main/java/javaeetutorial/guessnumber/Random.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.guessnumber; 9 | 10 | import java.lang.annotation.Documented; 11 | import static java.lang.annotation.ElementType.FIELD; 12 | import static java.lang.annotation.ElementType.METHOD; 13 | import static java.lang.annotation.ElementType.PARAMETER; 14 | import static java.lang.annotation.ElementType.TYPE; 15 | import java.lang.annotation.Retention; 16 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 17 | import java.lang.annotation.Target; 18 | import javax.inject.Qualifier; 19 | 20 | @Target({TYPE, METHOD, PARAMETER, FIELD}) 21 | @Retention(RUNTIME) 22 | @Documented 23 | @Qualifier 24 | public @interface Random { 25 | } 26 | -------------------------------------------------------------------------------- /cdi/guessnumber-cdi/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Faces Servlet 8 | javax.faces.webapp.FacesServlet 9 | 1 10 | 11 | 12 | Faces Servlet 13 | *.xhtml 14 | 15 | 16 | 17 | 30 18 | 19 | 20 | 21 | index.xhtml 22 | 23 | 24 | -------------------------------------------------------------------------------- /cdi/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | cdi 12 | pom 13 | 14 | cdi 15 | 16 | 17 | billpayment 18 | decorators 19 | encoder 20 | guessnumber-cdi 21 | producerfields 22 | producermethods 23 | simplegreeting 24 | 25 | 26 | 27 | ${project.artifactId} 28 | 29 | -------------------------------------------------------------------------------- /cdi/producerfields/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | cdi 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | producerfields 13 | war 14 | 15 | producerfields 16 | 17 | -------------------------------------------------------------------------------- /cdi/producerfields/src/main/java/javaeetutorial/producerfields/db/UserDatabase.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.producerfields.db; 9 | 10 | import static java.lang.annotation.ElementType.FIELD; 11 | import static java.lang.annotation.ElementType.METHOD; 12 | import static java.lang.annotation.ElementType.PARAMETER; 13 | import static java.lang.annotation.ElementType.TYPE; 14 | import java.lang.annotation.Retention; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | import java.lang.annotation.Target; 17 | import javax.inject.Qualifier; 18 | 19 | @Qualifier 20 | @Retention(RUNTIME) 21 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 22 | public @interface UserDatabase { 23 | } 24 | -------------------------------------------------------------------------------- /cdi/producerfields/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | org.eclipse.persistence.jpa.PersistenceProvider 8 | java:comp/DefaultDataSource 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /cdi/producermethods/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | cdi 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | producermethods 13 | war 14 | 15 | producermethods 16 | 17 | -------------------------------------------------------------------------------- /cdi/producermethods/src/main/java/javaeetutorial/producermethods/Chosen.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.producermethods; 9 | 10 | import static java.lang.annotation.ElementType.FIELD; 11 | import static java.lang.annotation.ElementType.METHOD; 12 | import static java.lang.annotation.ElementType.PARAMETER; 13 | import static java.lang.annotation.ElementType.TYPE; 14 | import java.lang.annotation.Retention; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | import java.lang.annotation.Target; 17 | import javax.inject.Qualifier; 18 | 19 | @Qualifier 20 | @Retention(RUNTIME) 21 | @Target({METHOD, FIELD, PARAMETER, TYPE}) 22 | public @interface Chosen { 23 | } 24 | -------------------------------------------------------------------------------- /cdi/producermethods/src/main/java/javaeetutorial/producermethods/Coder.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.producermethods; 9 | 10 | public interface Coder { 11 | 12 | public String codeString(String s, int tval); 13 | } 14 | -------------------------------------------------------------------------------- /cdi/producermethods/src/main/java/javaeetutorial/producermethods/TestCoderImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.producermethods; 9 | 10 | /** 11 | * Coder implementation that does nothing but display the values of the 12 | * arguments. 13 | */ 14 | public class TestCoderImpl implements Coder { 15 | 16 | /** 17 | * Returns a string that displays the values of the arguments. 18 | * 19 | * @param s the input string 20 | * @param tval the number of characters to shift 21 | * @return string displaying argument values 22 | */ 23 | @Override 24 | public String codeString(String s, int tval) { 25 | return ("input string is " + s + ", shift value is " + tval); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cdi/simplegreeting/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | cdi 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | simplegreeting 13 | war 14 | 15 | simplegreeting 16 | 17 | -------------------------------------------------------------------------------- /cdi/simplegreeting/src/main/java/javaeetutorial/simplegreeting/Greeting.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.simplegreeting; 9 | 10 | import javax.enterprise.context.Dependent; 11 | 12 | @Dependent 13 | public class Greeting { 14 | public String greet(String name) { 15 | return "Hello, " + name + "."; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cdi/simplegreeting/src/main/java/javaeetutorial/simplegreeting/Informal.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.simplegreeting; 9 | 10 | import static java.lang.annotation.ElementType.FIELD; 11 | import static java.lang.annotation.ElementType.METHOD; 12 | import static java.lang.annotation.ElementType.PARAMETER; 13 | import static java.lang.annotation.ElementType.TYPE; 14 | import java.lang.annotation.Retention; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | import java.lang.annotation.Target; 17 | import javax.inject.Qualifier; 18 | 19 | @Qualifier 20 | @Retention(RUNTIME) 21 | @Target({TYPE, METHOD, FIELD, PARAMETER}) 22 | public @interface Informal {} 23 | -------------------------------------------------------------------------------- /cdi/simplegreeting/src/main/java/javaeetutorial/simplegreeting/InformalGreeting.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.simplegreeting; 9 | 10 | import javax.enterprise.context.Dependent; 11 | 12 | @Informal 13 | @Dependent 14 | public class InformalGreeting extends Greeting { 15 | 16 | @Override 17 | public String greet(String name) { 18 | return "Hi, " + name + "!"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /cdi/simplegreeting/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Faces Servlet 8 | javax.faces.webapp.FacesServlet 9 | 1 10 | 11 | 12 | Faces Servlet 13 | *.xhtml 14 | 15 | 16 | 17 | 30 18 | 19 | 20 | 21 | index.xhtml 22 | 23 | 24 | -------------------------------------------------------------------------------- /common/admin-password.txt: -------------------------------------------------------------------------------- 1 | ==== 2 | Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. 3 | 4 | You may not modify, use, reproduce, or distribute this software except in 5 | compliance with the terms of the License at: 6 | https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | ==== 8 | 9 | AS_ADMIN_PASSWORD= 10 | -------------------------------------------------------------------------------- /common/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 2 | 3 | You may not modify, use, reproduce, or distribute this software except in 4 | compliance with the terms of the License at: 5 | https://github.com/javaee/tutorial-examples/LICENSE.txt 6 | -------------------------------------------------------------------------------- /concurrency/jobs/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | jobs 7 | war 8 | 9 | jobs 10 | 11 | 12 | org.glassfish.javaeetutorial 13 | concurrency 14 | 8.1-SNAPSHOT 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /concurrency/taskcreator/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | taskcreator 7 | war 8 | 9 | taskcreator 10 | 11 | 12 | org.glassfish.javaeetutorial 13 | concurrency 14 | 8.1-SNAPSHOT 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /connectors/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | connectors 6 | pom 7 | connectors 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | javaeetutorial 12 | 8.1-SNAPSHOT 13 | 14 | 15 | 16 | traffic 17 | trading 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /connectors/trading/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | trading 6 | pom 7 | trading 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | connectors 12 | 8.1-SNAPSHOT 13 | 14 | 15 | 16 | trading-ear 17 | trading-eis 18 | trading-rar 19 | trading-war 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /connectors/trading/trading-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /connectors/trading/trading-ear/src/main/application/META-INF/application.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | trading-ear 7 | trading-ear 8 | 9 | 10 | trading-war.war 11 | /trading 12 | 13 | 14 | 15 | trading-rar.rar 16 | 17 | lib 18 | 19 | -------------------------------------------------------------------------------- /connectors/trading/trading-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/trading/trading-ear/src/main/resources/empty -------------------------------------------------------------------------------- /connectors/trading/trading-eis/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/trading/trading-eis/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /connectors/trading/trading-eis/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/trading/trading-eis/src/test/java/.gitkeep -------------------------------------------------------------------------------- /connectors/trading/trading-rar/src/main/java/javaeetutorial/trading/rar/api/TradeConnection.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.trading.rar.api; 9 | 10 | import javax.resource.ResourceException; 11 | 12 | public interface TradeConnection { 13 | 14 | /* Submits a trade order to the EIS */ 15 | public TradeResponse submitOrder(TradeOrder order) 16 | throws TradeProcessingException; 17 | /* Closes the connection handle */ 18 | public void close() throws ResourceException; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /connectors/trading/trading-rar/src/main/java/javaeetutorial/trading/rar/api/TradeConnectionFactory.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.trading.rar.api; 9 | 10 | import javax.resource.ResourceException; 11 | 12 | public interface TradeConnectionFactory { 13 | 14 | /* Applications call this method, which delegates on the container's 15 | * connection manager to obtain a connection instance through 16 | * TradeManagedConnectionFactory */ 17 | public TradeConnection getConnection() throws ResourceException; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /connectors/trading/trading-rar/src/main/java/javaeetutorial/trading/rar/api/TradeProcessingException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.trading.rar.api; 9 | 10 | /* Indicates that the trade order could not be processed */ 11 | public class TradeProcessingException extends Exception { 12 | 13 | public TradeProcessingException(String msg) { 14 | super(msg); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /connectors/trading/trading-rar/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/trading/trading-rar/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /connectors/trading/trading-war/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/trading/trading-war/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /connectors/traffic/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | traffic 6 | pom 7 | traffic 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | connectors 12 | 8.1-SNAPSHOT 13 | 14 | 15 | 16 | traffic-eis 17 | traffic-rar 18 | traffic-ejb 19 | traffic-ear 20 | traffic-war 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-ear/src/main/application/META-INF/application.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | traffic-ear 7 | traffic-ear 8 | 9 | traffic-ejb.jar 10 | 11 | 12 | 13 | traffic-war.war 14 | /traffic 15 | 16 | 17 | 18 | traffic-rar.rar 19 | 20 | lib 21 | 22 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/traffic/traffic-ear/src/main/resources/empty -------------------------------------------------------------------------------- /connectors/traffic/traffic-eis/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/traffic/traffic-eis/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /connectors/traffic/traffic-ejb/src/main/resources/META-INF/glassfish-ejb-jar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TrafficMdb 6 | TrafficMdb 7 | 8 | traffic-ear#traffic-rar 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-rar/src/main/java/javaeetutorial/traffic/rar/api/TrafficCommand.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.traffic.rar.api; 9 | 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | import java.lang.annotation.Target; 14 | 15 | /* Annotation to decorate methods in the MDB */ 16 | @Target({ElementType.METHOD}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | public @interface TrafficCommand { 19 | String name() default ""; 20 | String info() default ""; 21 | } 22 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-rar/src/main/java/javaeetutorial/traffic/rar/api/TrafficListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.traffic.rar.api; 9 | 10 | /* Thanks to the functionality introduced in JCA 1.7, 11 | * this interface - and the connector - do not have to change when the MDB implements 12 | * a new method. The MDB just uses an annotation for command methods. */ 13 | public interface TrafficListener { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /connectors/traffic/traffic-rar/src/main/resources/META-INF/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/traffic/traffic-rar/src/main/resources/META-INF/.gitkeep -------------------------------------------------------------------------------- /connectors/traffic/traffic-war/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/connectors/traffic/traffic-war/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /connectors/traffic/traffic-war/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 30 6 | 7 | 8 | 9 | index.html 10 | 11 | 12 | -------------------------------------------------------------------------------- /ejb/async/async-smtpd/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/async/async-smtpd/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /ejb/async/async-smtpd/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/async/async-smtpd/src/test/java/.gitkeep -------------------------------------------------------------------------------- /ejb/async/async-war/src/main/setup/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/async/async-war/src/main/setup/.gitkeep -------------------------------------------------------------------------------- /ejb/async/async-war/src/main/webapp/response.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ejb/async/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | async 6 | pom 7 | async 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | ejb 12 | 8.1-SNAPSHOT 13 | 14 | 15 | 16 | async-war 17 | async-smtpd 18 | 19 | 20 | -------------------------------------------------------------------------------- /ejb/cart/cart-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: javaeetutorial.cart.client.CartClient 3 | Class-Path: cart-ejb.jar 4 | -------------------------------------------------------------------------------- /ejb/cart/cart-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cart-appclient 4 | 5 | -------------------------------------------------------------------------------- /ejb/cart/cart-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | cart 7 | 8.1-SNAPSHOT 8 | 9 | org.glassfish.javaeetutorial 10 | cart-common 11 | cart-common 12 | 13 | -------------------------------------------------------------------------------- /ejb/cart/cart-common/src/main/java/javaeetutorial/cart/ejb/Cart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cart.ejb; 9 | 10 | 11 | import java.util.List; 12 | import javaeetutorial.cart.util.BookException; 13 | import javax.ejb.Remote; 14 | 15 | 16 | @Remote 17 | public interface Cart { 18 | public void initialize(String person) throws BookException; 19 | 20 | public void initialize( 21 | String person, 22 | String id) throws BookException; 23 | 24 | public void addBook(String title); 25 | 26 | public void removeBook(String title) throws BookException; 27 | 28 | public List getContents(); 29 | 30 | public void remove(); 31 | } 32 | -------------------------------------------------------------------------------- /ejb/cart/cart-common/src/main/java/javaeetutorial/cart/util/BookException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cart.util; 9 | 10 | public class BookException extends Exception { 11 | private static final long serialVersionUID = 6274585742564840905L; 12 | public BookException() { 13 | } 14 | 15 | public BookException(String msg) { 16 | super(msg); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ejb/cart/cart-common/src/main/java/javaeetutorial/cart/util/IdVerifier.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cart.util; 9 | 10 | public class IdVerifier { 11 | public IdVerifier() { 12 | } 13 | 14 | public boolean validate(String id) { 15 | boolean result = true; 16 | 17 | for (int i = 0; i < id.length(); i++) { 18 | if (Character.isDigit(id.charAt(i)) == false) { 19 | result = false; 20 | } 21 | } 22 | 23 | return result; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ejb/cart/cart-ear/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-Run Application Client 5 | Run Application Client 6 | 7 | install 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ejb/cart/cart-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: cart-ejb.jar 3 | -------------------------------------------------------------------------------- /ejb/cart/cart-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/cart/cart-ear/src/main/resources/empty -------------------------------------------------------------------------------- /ejb/cart/cart-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejb/cart/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | cart 6 | pom 7 | cart 8 | 9 | 10 | ejb 11 | org.glassfish.javaeetutorial 12 | 8.1-SNAPSHOT 13 | 14 | 15 | cart-common 16 | cart-ejb 17 | cart-appclient 18 | cart-ear 19 | 20 | -------------------------------------------------------------------------------- /ejb/converter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | converter 7 | war 8 | ${project.artifactId} 9 | 10 | 11 | ejb 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | ${project.artifactId} 18 | 19 | 20 | -------------------------------------------------------------------------------- /ejb/converter/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/converter/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /ejb/converter/src/main/webapp/WEB-INF/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/ejb/converter/src/main/webapp/WEB-INF/.gitkeep -------------------------------------------------------------------------------- /ejb/counter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | counter 7 | war 8 | ${project.artifactId} 9 | 10 | 11 | ejb 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | ${project.artifactId} 18 | 19 | 20 | -------------------------------------------------------------------------------- /ejb/counter/src/main/java/javaeetutorial/counter/ejb/CounterBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.counter.ejb; 9 | 10 | import javax.ejb.Singleton; 11 | 12 | /** 13 | * 14 | * @author ian 15 | * CounterBean is a simple singleton session bean that records the number 16 | * of hits to a web page. 17 | */ 18 | @Singleton 19 | public class CounterBean { 20 | private int hits = 1; 21 | 22 | // Increment and return the number of hits 23 | public int getHits() { 24 | return hits++; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ejb/counter/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 16 | 17 | 18 | This page has been accessed #{count.hitCount} time(s). 19 | 20 | 21 | Hooray! 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ejb/helloservice/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | org.glassfish.javaeetutorial 5 | helloservice 6 | ejb 7 | 8 | helloservice 9 | 10 | 11 | ejb 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ejb/helloservice/src/main/java/javaeetutorial/helloservice/ejb/HelloServiceBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.helloservice.ejb; 9 | 10 | import javax.ejb.Stateless; 11 | import javax.jws.WebMethod; 12 | import javax.jws.WebService; 13 | 14 | /** 15 | * HelloServiceBean is a web service endpoint implemented as a stateless 16 | * session bean. 17 | */ 18 | 19 | @Stateless 20 | @WebService 21 | public class HelloServiceBean { 22 | private final String message = "Hello, "; 23 | 24 | public void HelloServiceBean() {} 25 | 26 | @WebMethod 27 | public String sayHello(String name) { 28 | return message + name + "."; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ejb/helloservice/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejb/interceptor/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | interceptor 7 | war 8 | ${project.artifactId} 9 | 10 | 11 | ejb 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | ${project.artifactId} 18 | 19 | 20 | -------------------------------------------------------------------------------- /ejb/interceptor/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | Interceptor Example 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ejb/interceptor/src/main/webapp/response.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | Interceptor example response 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /ejb/standalone/src/main/java/javaeetutorial/standalone/ejb/StandaloneBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.standalone.ejb; 9 | 10 | import javax.ejb.Stateless; 11 | 12 | @Stateless 13 | public class StandaloneBean { 14 | 15 | private static final String message = "Greetings!"; 16 | 17 | public String returnMessage() { 18 | return message; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ejb/standalone/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /ejb/timersession/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | timersession 7 | war 8 | ${project.artifactId} 9 | 10 | 11 | ejb 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | ${project.artifactId} 18 | 19 | 20 | -------------------------------------------------------------------------------- /jaxrs/customer/faces-config.NavData: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /jaxrs/customer/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.glassfish.javaeetutorial 4 | customer 5 | war 6 | customer 7 | 8 | 9 | org.glassfish.javaeetutorial 10 | jaxrs 11 | 8.1-SNAPSHOT 12 | 13 | 14 | -------------------------------------------------------------------------------- /jaxrs/customer/src/main/java/javaeetutorial/customer/resource/CustomerApplication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.customer.resource; 9 | 10 | import java.util.HashSet; 11 | import java.util.Set; 12 | import javax.ws.rs.ApplicationPath; 13 | import javax.ws.rs.core.Application; 14 | 15 | /** 16 | * 17 | * @author ievans 18 | */ 19 | @ApplicationPath("/webapi") 20 | public class CustomerApplication extends Application { 21 | @Override 22 | public Set> getClasses() { 23 | final Set> classes = new HashSet<>(); 24 | // register root resource 25 | classes.add(CustomerService.class); 26 | return classes; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /jaxrs/customer/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.eclipse.persistence.jpa.PersistenceProvider 5 | java:comp/DefaultDataSource 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jaxrs/customer/src/main/webapp/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | /index.xhtml 8 | 9 | customerError 10 | /error.xhtml 11 | 12 | 13 | customerCreated 14 | /list.xhtml 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jaxrs/customer/src/main/webapp/error.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 15 | Java EE 7 Tutorial: JAX-RS Customer example - Error 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /jaxrs/customer/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jaxrs/customer/src/test/java/.gitkeep -------------------------------------------------------------------------------- /jaxrs/hello/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.glassfish.javaeetutorial 4 | hello 5 | war 6 | hello 7 | 8 | 9 | org.glassfish.javaeetutorial 10 | jaxrs 11 | 8.1-SNAPSHOT 12 | 13 | 14 | -------------------------------------------------------------------------------- /jaxrs/hello/src/main/java/javaeetutorial/hello/HelloApplication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | /* 9 | * To change this template, choose Tools | Templates 10 | * and open the template in the editor. 11 | */ 12 | package javaeetutorial.hello; 13 | 14 | import javax.ws.rs.ApplicationPath; 15 | import javax.ws.rs.core.Application; 16 | 17 | /** 18 | * 19 | * @author ievans 20 | */ 21 | @ApplicationPath("/") 22 | public class HelloApplication extends Application { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /jaxrs/rsvp/faces-config.NavData: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /jaxrs/rsvp/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.glassfish.javaeetutorial 4 | rsvp 5 | war 6 | rsvp 7 | 8 | 9 | org.glassfish.javaeetutorial 10 | jaxrs 11 | 8.1-SNAPSHOT 12 | 13 | 14 | -------------------------------------------------------------------------------- /jaxrs/rsvp/src/main/java/javaeetutorial/rsvp/rest/RsvpApplication.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.rsvp.rest; 9 | 10 | import javax.ws.rs.ApplicationPath; 11 | import javax.ws.rs.core.Application; 12 | 13 | /** 14 | * 15 | * @author ievans 16 | */ 17 | @ApplicationPath("/webapi") 18 | public class RsvpApplication extends Application { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /jaxrs/rsvp/src/main/java/javaeetutorial/rsvp/util/ResponseEnum.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.rsvp.util; 9 | 10 | public enum ResponseEnum { 11 | ATTENDING("Attending"), 12 | NOT_ATTENDING("Not attending"), 13 | MAYBE_ATTENDING("Maybe"), 14 | NOT_RESPONDED("No response yet"); 15 | 16 | private final String label; 17 | 18 | private ResponseEnum(String label) { 19 | this.label = label; 20 | } 21 | 22 | public String getLabel() { 23 | return this.label; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jaxrs/rsvp/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.eclipse.persistence.jpa.PersistenceProvider 5 | java:comp/DefaultDataSource 6 | false 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jaxws/hello-webclient/src/main/webapp/WEB-INF/jax-ws-catalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /jaxws/helloservice-war/src/main/java/javaeetutorial/helloservice/Hello.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.helloservice; 9 | 10 | import javax.jws.WebService; 11 | import javax.jws.WebMethod; 12 | 13 | @WebService 14 | public class Hello { 15 | 16 | private final String message = "Hello, "; 17 | 18 | public Hello() { 19 | } 20 | 21 | @WebMethod 22 | public String sayHello(String name) { 23 | return message + name + "."; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jaxws/helloservice-war/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jaxws/helloservice-war/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /jaxws/helloservice-war/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 30 9 | 10 | 11 | -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: javaeetutorial.clientmdbentity.appclient.HumanResourceClient 3 | Class-Path: clientmdbentity-ejb.jar -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | clientmdbentity-appclient 7 | 8 | -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: clientmdbentity-ejb.jar 3 | -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jms/clientmdbentity/clientmdbentity-ear/src/main/resources/empty -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/clientmdbentity/clientmdbentity-ejb/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | org.eclipse.persistence.jpa.PersistenceProvider 7 | java:comp/DefaultDataSource 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /jms/clientmdbentity/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | clientmdbentity 13 | pom 14 | 15 | clientmdbentity 16 | 17 | 18 | clientmdbentity-ear 19 | clientmdbentity-ejb 20 | clientmdbentity-appclient 21 | 22 | -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: javaeetutorial.clientsessionmdb.appclient.MyAppClient 3 | Class-Path: clientsessionmdb-ejb.jar 4 | -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | clientsessionmdb-appclient 7 | 8 | -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-ear/src/main/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jms/clientsessionmdb/clientsessionmdb-ear/src/main/.gitkeep -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jms/clientsessionmdb/clientsessionmdb-ear/src/main/resources/empty -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-ejb/src/main/java/javaeetutorial/clientsessionmdb/sb/PublisherRemote.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.clientsessionmdb.sb; 9 | 10 | import javax.ejb.Remote; 11 | 12 | /** 13 | * Remote interface for Publisher enterprise bean. Declares one 14 | * business method. 15 | */ 16 | @Remote 17 | public interface PublisherRemote { 18 | public void publishNews(); 19 | } 20 | -------------------------------------------------------------------------------- /jms/clientsessionmdb/clientsessionmdb-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/clientsessionmdb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | clientsessionmdb 13 | pom 14 | 15 | clientsessionmdb 16 | 17 | 18 | clientsessionmdb-ear 19 | clientsessionmdb-ejb 20 | clientsessionmdb-appclient 21 | 22 | -------------------------------------------------------------------------------- /jms/durablesubscriptionexample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | durablesubscriptionexample 13 | pom 14 | 15 | durablesubscriptionexample 16 | 17 | 18 | durableconsumer 19 | unsubscriber 20 | 21 | -------------------------------------------------------------------------------- /jms/shared/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | shared 7 | pom 8 | 9 | 10 | jms 11 | org.glassfish.javaeetutorial 12 | 8.1-SNAPSHOT 13 | 14 | 15 | shared 16 | 17 | 18 | sharedconsumer 19 | shareddurableconsumer 20 | 21 | -------------------------------------------------------------------------------- /jms/shared/sharedconsumer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/shared/sharedconsumer/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | sharedconsumer 7 | 8 | -------------------------------------------------------------------------------- /jms/shared/shareddurableconsumer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/shared/shareddurableconsumer/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | shareddurablesubscriberexample 7 | 8 | -------------------------------------------------------------------------------- /jms/simple/asynchconsumer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: AsynchConsumer 3 | -------------------------------------------------------------------------------- /jms/simple/clientackconsumer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/simple/messagebrowser/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: MessageBrowser 3 | -------------------------------------------------------------------------------- /jms/simple/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jms 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | simple 12 | pom 13 | 14 | simple 15 | 16 | 17 | asynchconsumer 18 | clientackconsumer 19 | messagebrowser 20 | producer 21 | synchconsumer 22 | 23 | -------------------------------------------------------------------------------- /jms/simple/producer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: Producer -------------------------------------------------------------------------------- /jms/simple/producer/src/main/setup/glassfish-resources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /jms/simple/synchconsumer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: SynchConsumer 3 | 4 | -------------------------------------------------------------------------------- /jms/simplemessage/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | simplemessage 13 | pom 14 | 15 | simplemessage 16 | 17 | 18 | simplemessage-ear 19 | simplemessage-ejb 20 | simplemessage-appclient 21 | 22 | -------------------------------------------------------------------------------- /jms/simplemessage/simplemessage-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: javaeetutorial.simplemessage.appclient.SimpleMessageClient 3 | Class-Path: simplemessage-ejb.jar 4 | 5 | -------------------------------------------------------------------------------- /jms/simplemessage/simplemessage-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | simplemessage-appclient 7 | 8 | -------------------------------------------------------------------------------- /jms/simplemessage/simplemessage-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/simplemessage/simplemessage-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jms/simplemessage/simplemessage-ear/src/main/resources/empty -------------------------------------------------------------------------------- /jms/simplemessage/simplemessage-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/transactedexample/genericsupplier/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/transactedexample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jms 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | transactedexample 13 | pom 14 | 15 | transactedexample 16 | 17 | 18 | retailer 19 | vendor 20 | genericsupplier 21 | 22 | 23 | -------------------------------------------------------------------------------- /jms/transactedexample/retailer/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/transactedexample/vendor/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /jms/websimplemessage/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Faces Servlet 8 | javax.faces.webapp.FacesServlet 9 | 1 10 | 11 | 12 | Faces Servlet 13 | *.xhtml 14 | 15 | 16 | 17 | 30 18 | 19 | 20 | 21 | sender.xhtml 22 | 23 | 24 | -------------------------------------------------------------------------------- /jms/websimplemessage/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/jms/websimplemessage/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /persistence/address-book/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.eclipse.persistence.jpa.PersistenceProvider 5 | java:comp/DefaultDataSource 6 | false 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /persistence/address-book/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # You may not modify, use, reproduce, or distribute this software except in 5 | # compliance with the terms of the License at: 6 | # https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | # 8 | 9 | # Validation message string for the JavaBeans Validation API 10 | invalid.email=Not a valid email address. 11 | invalid.phonenumber=Not a valid phone number. 12 | -------------------------------------------------------------------------------- /persistence/address-book/src/main/webapp/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | /Bundle 12 | bundle 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /persistence/address-book/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | Java Persistence API with JavaBeans Annotations Example 17 | 18 | 19 | 20 |

Welcome to the Address Book example.

21 | 22 |

23 |
24 |
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /persistence/order/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | java:comp/DefaultDataSource 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /persistence/order/src/main/webapp/lineItem-template.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | Order Persistence Example 18 | 19 | 20 | 21 |

Default Title

22 | 23 | Default Body 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /persistence/roster/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | roster 6 | pom 7 | roster 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | persistence 12 | 8.1-SNAPSHOT 13 | 14 | 15 | 16 | roster-common 17 | roster-ejb 18 | roster-appclient 19 | roster-ear 20 | 21 | -------------------------------------------------------------------------------- /persistence/roster/roster-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: roster-ejb.jar, roster-common.jar 3 | Main-Class: javaeetutorial.roster.client.RosterClient 4 | -------------------------------------------------------------------------------- /persistence/roster/roster-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | roster application client 7 | 8 | -------------------------------------------------------------------------------- /persistence/roster/roster-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | roster 7 | 8.1-SNAPSHOT 8 | 9 | org.glassfish.javaeetutorial 10 | roster-common 11 | roster-common 12 | 13 | -------------------------------------------------------------------------------- /persistence/roster/roster-common/src/main/java/javaeetutorial/roster/util/IncorrectSportException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.roster.util; 9 | 10 | public class IncorrectSportException extends java.lang.Exception { 11 | 12 | /** 13 | * Creates a new instance of IncorrectSportException without detail message. 14 | */ 15 | public IncorrectSportException() { 16 | } 17 | 18 | 19 | /** 20 | * Constructs an instance of IncorrectSportException with the specified detail message. 21 | * @param msg the detail message. 22 | */ 23 | public IncorrectSportException(String msg) { 24 | super(msg); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /persistence/roster/roster-ear/nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-Run Application Client 5 | Run Application Client 6 | 7 | install 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /persistence/roster/roster-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /persistence/roster/roster-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/persistence/roster/roster-ear/src/main/resources/empty -------------------------------------------------------------------------------- /persistence/roster/roster-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: roster-common.jar 3 | -------------------------------------------------------------------------------- /persistence/roster/roster-ejb/src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | java:comp/DefaultDataSource 8 | 9 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-appclient/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: javaeetutorial.cartsecure.client.CartClient 3 | Class-Path: cart-secure-ejb.jar 4 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-appclient/src/main/resources/META-INF/application-client.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | cart-secure-appclient 4 | 5 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | cart-secure 7 | 8.1-SNAPSHOT 8 | 9 | org.glassfish.javaeetutorial 10 | cart-secure-common 11 | cart-secure-common 12 | 13 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-common/src/main/java/javaeetutorial/cartsecure/ejb/Cart.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cartsecure.ejb; 9 | 10 | 11 | import java.util.List; 12 | import javaeetutorial.cartsecure.util.BookException; 13 | import javax.ejb.Remote; 14 | 15 | 16 | @Remote 17 | public interface Cart { 18 | public void initialize(String person) throws BookException; 19 | 20 | public void initialize( 21 | String person, 22 | String id) throws BookException; 23 | 24 | public void addBook(String title); 25 | 26 | public void removeBook(String title) throws BookException; 27 | 28 | public List getContents(); 29 | 30 | public void remove(); 31 | } 32 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-common/src/main/java/javaeetutorial/cartsecure/util/BookException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cartsecure.util; 9 | 10 | public class BookException extends Exception { 11 | private static final long serialVersionUID = 6274585742564840905L; 12 | public BookException() { 13 | } 14 | 15 | public BookException(String msg) { 16 | super(msg); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-common/src/main/java/javaeetutorial/cartsecure/util/IdVerifier.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.cartsecure.util; 9 | 10 | public class IdVerifier { 11 | public IdVerifier() { 12 | } 13 | 14 | public boolean validate(String id) { 15 | boolean result = true; 16 | 17 | for (int i = 0; i < id.length(); i++) { 18 | if (Character.isDigit(id.charAt(i)) == false) { 19 | result = false; 20 | } 21 | } 22 | 23 | return result; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-ear/src/main/application/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: cart-secure-ejb.jar 3 | -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-ear/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/security/cart-secure/cart-secure-ear/src/main/resources/empty -------------------------------------------------------------------------------- /security/cart-secure/cart-secure-ejb/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | 3 | -------------------------------------------------------------------------------- /security/cart-secure/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | org.glassfish.javaeetutorial 5 | cart-secure 6 | pom 7 | cart-secure 8 | 9 | 10 | security 11 | org.glassfish.javaeetutorial 12 | 8.1-SNAPSHOT 13 | 14 | 15 | cart-secure-appclient 16 | cart-secure-common 17 | cart-secure-ear 18 | cart-secure-ejb 19 | 20 | -------------------------------------------------------------------------------- /security/converter-secure/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.glassfish.javaeetutorial 6 | converter-secure 7 | war 8 | ${project.artifactId} 9 | 10 | 11 | security 12 | org.glassfish.javaeetutorial 13 | 8.1-SNAPSHOT 14 | 15 | 16 | 17 | ${project.artifactId} 18 | 19 | 20 | -------------------------------------------------------------------------------- /security/hello1-formauth/src/main/java/javaeetutorial/hello1_formauth/Hello.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.hello1_formauth; 9 | 10 | import javax.enterprise.context.RequestScoped; 11 | import javax.inject.Named; 12 | 13 | @Named 14 | @RequestScoped 15 | public class Hello { 16 | 17 | private String name; 18 | 19 | public Hello() { 20 | } 21 | 22 | public String getName() { 23 | return name; 24 | } 25 | 26 | public void setName(String user_name) { 27 | this.name = user_name; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /security/hello1-formauth/src/main/webapp/error.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 15 | Login Error 16 | 17 | 18 |

Invalid user name or password.

19 | 20 |

Please enter a user name or password that is authorized to access 21 | this application. For this application, this means a user that 22 | has been created in the file realm and has been 23 | assigned to the group of TutorialUser.

24 |

Return to login page

25 | 26 | 27 | -------------------------------------------------------------------------------- /security/hello1-formauth/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/security/hello1-formauth/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /security/hello2-basicauth/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/security/hello2-basicauth/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /security/security-api/custom-identity-store/src/main/java/javaeetutorial/custom_identity_store/ApplicationConfig.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved. 3 | *

4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | 9 | package javaeetutorial.custom_identity_store; 10 | 11 | import javax.security.enterprise.authentication.mechanism.http.BasicAuthenticationMechanismDefinition; 12 | import javax.enterprise.context.ApplicationScoped; 13 | import javax.inject.Named; 14 | import javax.security.enterprise.identitystore.DatabaseIdentityStoreDefinition; 15 | 16 | @BasicAuthenticationMechanismDefinition( 17 | realmName = "file" 18 | ) 19 | 20 | @ApplicationScoped 21 | @Named 22 | public class ApplicationConfig { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /security/security-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | security 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | security-api 13 | 8.1-SNAPSHOT 14 | pom 15 | 16 | security-api 17 | 18 | 19 | built-in-db-identity-store 20 | custom-identity-store 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /web/jsf/ajaxguessnumber/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jsf 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | ajaxguessnumber 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | ajaxguessnumber 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/ajaxguessnumber/src/main/webapp/resources/images/wave.med.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/ajaxguessnumber/src/main/webapp/resources/images/wave.med.gif -------------------------------------------------------------------------------- /web/jsf/bookmarks/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jsf 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | bookmarks 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | bookmarks 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/bookmarks/src/main/java/javaeetutorial/bookmarks/Hello.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.bookmarks; 9 | 10 | import javax.enterprise.inject.Model; 11 | 12 | @Model 13 | public class Hello { 14 | 15 | private String name; 16 | 17 | public Hello() { 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String user_name) { 25 | this.name = user_name; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /web/jsf/bookmarks/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/bookmarks/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /web/jsf/checkout-module/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jsf 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | checkout-module 13 | war 14 | 15 | ${project.artifactId} 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/checkout-module/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /web/jsf/checkout-module/src/main/webapp/resources/images/duke.books.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/checkout-module/src/main/webapp/resources/images/duke.books.gif -------------------------------------------------------------------------------- /web/jsf/compositecomponentexample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | jsf 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | compositecomponentexample 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | compositecomponentexample 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/guessnumber-jsf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jsf 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | guessnumber-jsf 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | guessnumber-jsf 16 | 17 | -------------------------------------------------------------------------------- /web/jsf/guessnumber-jsf/src/main/webapp/resources/images/wave.med.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/guessnumber-jsf/src/main/webapp/resources/images/wave.med.gif -------------------------------------------------------------------------------- /web/jsf/hello1-rlc/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jsf 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | hello1-rlc 13 | 8.1-SNAPSHOT 14 | war 15 | 16 | ${project.artifactId} 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/hello1-rlc/src/main/java/javaeetutorial/hello1rlc/Hello.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.hello1rlc; 9 | 10 | import javax.enterprise.inject.Model; 11 | 12 | @Model 13 | public class Hello { 14 | 15 | private String name; 16 | 17 | public Hello() { 18 | } 19 | 20 | public String getName() { 21 | return name; 22 | } 23 | 24 | public void setName(String user_name) { 25 | this.name = user_name; 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /web/jsf/hello1-rlc/src/main/webapp/WEB-INF/faces-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | /reply/* 10 | reply 11 | 12 | 13 | * 14 | hello 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/jsf/hello1-rlc/src/main/webapp/contracts/hello/duke.handsOnHips.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/hello1-rlc/src/main/webapp/contracts/hello/duke.handsOnHips.gif -------------------------------------------------------------------------------- /web/jsf/hello1-rlc/src/main/webapp/contracts/reply/duke.thumbsup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/hello1-rlc/src/main/webapp/contracts/reply/duke.thumbsup.gif -------------------------------------------------------------------------------- /web/jsf/hello1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | jsf 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | hello1 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | ${project.artifactId} 16 | 17 | -------------------------------------------------------------------------------- /web/jsf/hello1/src/main/java/javaeetutorial/hello1/Hello.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.hello1; 9 | 10 | 11 | import javax.enterprise.context.RequestScoped; 12 | import javax.inject.Named; 13 | 14 | @Named 15 | @RequestScoped 16 | public class Hello { 17 | 18 | private String name; 19 | 20 | public Hello() { 21 | } 22 | 23 | public String getName() { 24 | return name; 25 | } 26 | 27 | public void setName(String user_name) { 28 | this.name = user_name; 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /web/jsf/hello1/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/hello1/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /web/jsf/hello1/src/main/webapp/response.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Facelets Hello Response 9 | 10 | 11 | 12 | 14 |

Hello, #{hello.name}!

15 |

16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /web/jsf/reservation/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jsf 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | reservation 13 | 8.1-SNAPSHOT 14 | war 15 | 16 | ${project.artifactId} 17 | 18 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | jsf 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | simple-flow 13 | war 14 | 15 | simple-flow 16 | 17 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/resources/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/simple-flow/src/main/resources/empty -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/index.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 15 | 16 | Index Page 17 | 18 | 19 | 20 |

Index Page

21 | 22 |

23 |
24 |
25 | 26 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/simple-flow-return.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 15 | 16 | Return Page 17 | 18 | 19 | 20 |

Return Page

21 | 22 |

Value (should be empty): 23 | ""

24 | 25 |

26 |
27 |
28 | 29 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/simple-flow/simple-flow-flow.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsf/simple-flow/src/main/webapp/simple-flow/simple-flow-flow.xml -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/simple-flow/simple-flow-page2.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 15 | 16 | Second Page in the Flow 17 | 18 | 19 | 20 |

Second Page in the Flow

21 | 22 |

Value: #{flowScope.value}

23 | 24 |

25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /web/jsf/simple-flow/src/main/webapp/simple-flow/simple-flow.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 15 | 16 | First Page in the Flow 17 | 18 | 19 | 20 |

First Page in the Flow

21 | 22 |

Value:

23 | 24 |

25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /web/jsonb/jsonbbasics/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | jsonb 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | jsonbbasics 12 | war 13 | 14 | jsonbbasics 15 | 16 | -------------------------------------------------------------------------------- /web/jsonb/jsonbbasics/src/main/webapp/jsongenerated.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 15 | JSON Deserialization Example 16 | 17 | 18 | 19 |

JSON Deserializer

20 |

JSON Output

21 | 22 |
23 | 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /web/jsonb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | web 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | jsonb 12 | pom 13 | 14 | jsonb 15 | 16 | 17 | jsonbbasics 18 | 19 | -------------------------------------------------------------------------------- /web/jsonp/jsonpmodel/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | jsonp 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | jsonpmodel 12 | war 13 | 14 | jsonpmodel 15 | 16 | -------------------------------------------------------------------------------- /web/jsonp/jsonpmodel/src/main/webapp/modelcreated.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 15 | JSON Object Model Example 16 | 17 | 18 | 19 |

JSON Object Model

20 |

JSON Output

21 | 22 |
23 | 24 |
25 |
26 | 27 | -------------------------------------------------------------------------------- /web/jsonp/jsonpstreaming/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | jsonp 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | jsonpstreaming 12 | war 13 | 14 | jsonpstreaming 15 | -------------------------------------------------------------------------------- /web/jsonp/jsonpstreaming/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/jsonp/jsonpstreaming/src/test/java/.gitkeep -------------------------------------------------------------------------------- /web/jsonp/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | web 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | jsonp 12 | pom 13 | 14 | jsonp 15 | 16 | 17 | jsonpmodel 18 | jsonpstreaming 19 | 20 | -------------------------------------------------------------------------------- /web/servlet/dukeetf/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | servlet 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | dukeetf 13 | war 14 | 15 | dukeetf 16 | 17 | 18 | ${project.artifactId} 19 | 20 | -------------------------------------------------------------------------------- /web/servlet/fileupload/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | servlet 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | fileupload 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | fileupload 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/servlet/fileupload/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/fileupload/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /web/servlet/fileupload/src/main/webapp/WEB-INF/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/fileupload/src/main/webapp/WEB-INF/.gitkeep -------------------------------------------------------------------------------- /web/servlet/fileupload/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | File Upload 14 | 15 | 16 | 17 |
18 | File: 19 |
20 | Destination: 21 | 22 |
23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /web/servlet/hello2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | servlet 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | hello2 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | hello2 16 | 17 | -------------------------------------------------------------------------------- /web/servlet/hello2/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/hello2/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /web/servlet/mood/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | servlet 6 | org.glassfish.javaeetutorial 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | mood 12 | 8.1-SNAPSHOT 13 | war 14 | 15 | mood 16 | 17 | -------------------------------------------------------------------------------- /web/servlet/mood/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/WEB-INF/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/WEB-INF/.gitkeep -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.cookies.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.cookies.gif -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.handsOnHips.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.handsOnHips.gif -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.pensive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.pensive.gif -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.snooze.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.snooze.gif -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.thumbsup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.thumbsup.gif -------------------------------------------------------------------------------- /web/servlet/mood/src/main/webapp/resources/images/duke.waving.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/servlet/mood/src/main/webapp/resources/images/duke.waving.gif -------------------------------------------------------------------------------- /web/servlet/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | web 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | servlet 12 | pom 13 | 14 | servlet 15 | 16 | 17 | dukeetf 18 | fileupload 19 | hello2 20 | mood 21 | 22 | -------------------------------------------------------------------------------- /web/websocket/dukeetf2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | websocket 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | dukeetf2 13 | war 14 | 15 | dukeetf2 16 | -------------------------------------------------------------------------------- /web/websocket/dukeetf2/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/websocket/dukeetf2/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /web/websocket/dukeetf2/src/main/webapp/WEB-INF/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/websocket/dukeetf2/src/main/webapp/WEB-INF/.gitkeep -------------------------------------------------------------------------------- /web/websocket/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | 5 | org.glassfish.javaeetutorial 6 | web 7 | 8.1-SNAPSHOT 8 | 9 | 10 | org.glassfish.javaeetutorial 11 | websocket 12 | pom 13 | 14 | websocket 15 | 16 | 17 | dukeetf2 18 | websocketbot 19 | 20 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | websocket 7 | org.glassfish.javaeetutorial 8 | 8.1-SNAPSHOT 9 | 10 | 11 | org.glassfish.javaeetutorial 12 | websocketbot 13 | war 14 | 15 | websocketbot 16 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/java/javaeetutorial/web/websocketbot/messages/InfoMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.web.websocketbot.messages; 9 | 10 | /* Represents an information message, like 11 | * an user entering or leaving the chat */ 12 | public class InfoMessage extends Message { 13 | 14 | private String info; 15 | 16 | public InfoMessage(String info) { 17 | this.info = info; 18 | } 19 | 20 | public String getInfo() { 21 | return info; 22 | } 23 | 24 | /* For logging purposes */ 25 | @Override 26 | public String toString() { 27 | return "[InfoMessage] " + info; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/java/javaeetutorial/web/websocketbot/messages/JoinMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.web.websocketbot.messages; 9 | 10 | /* Represents a join message for the chat */ 11 | public class JoinMessage extends Message { 12 | private String name; 13 | 14 | public JoinMessage(String name) { 15 | this.name = name; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | /* For logging purposes */ 23 | @Override 24 | public String toString() { 25 | return "[JoinMessage] " + name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/java/javaeetutorial/web/websocketbot/messages/Message.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.web.websocketbot.messages; 9 | 10 | public class Message { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/java/javaeetutorial/web/websocketbot/messages/UsersMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * You may not modify, use, reproduce, or distribute this software except in 5 | * compliance with the terms of the License at: 6 | * https://github.com/javaee/tutorial-examples/LICENSE.txt 7 | */ 8 | package javaeetutorial.web.websocketbot.messages; 9 | 10 | import java.util.List; 11 | 12 | /* Represents the list of users currently connected to the chat */ 13 | public class UsersMessage extends Message { 14 | private List userlist; 15 | 16 | public UsersMessage(List userlist) { 17 | this.userlist = userlist; 18 | } 19 | 20 | public List getUserList() { 21 | return userlist; 22 | } 23 | 24 | /* For logging purposes */ 25 | @Override 26 | public String toString() { 27 | return "[UsersMessage] " + userlist.toString(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/tutorial-examples/41db0d1b26ec94313df132b9d676f8042eeb5157/web/websocket/websocketbot/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /web/websocket/websocketbot/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | --------------------------------------------------------------------------------