Course (2-7-2) Java JEE 1.6 Part 2
- 26. Using the Embedded Enterprise Bean Container
- 26.1. Overview of the Embedded Enterprise Bean Container
- 26.2. Developing Embeddable Enterprise Bean Applications
- 26.2.1. Running Embedded Applications
- 26.2.2. Creating the Enterprise Bean Container
- 26.2.3. Looking Up Session Bean References
- 26.2.4. Shutting Down the Enterprise Bean Container
- 26.3. The standalone Example Application
- 26.3.1. To Run the standalone Example Application
- 27. Using Asynchronous Method Invocation in Session Beans
- 27.1. Asynchronous Method Invocation
- 27.1.1. Creating an Asynchronous Business Method
- 27.1.2. Calling Asynchronous Methods from Enterprise Bean Clients
- 27.2. The async Example Application
- 27.2.1. Architecture of the async Example Application
- 27.2.2. Running the async Example
- 27.1. Asynchronous Method Invocation
- 28. Introduction to Contexts and Dependency Injection for the Java EE Platform
- 28.1. Overview of CDI
- 28.2. About Beans
- 28.3. About CDI Managed Beans
- 28.4. Beans as Injectable Objects
- 28.5. Using Qualifiers
- 28.6. Injecting Beans
- 28.7. Using Scopes
- 28.8. Overriding the Scope of a Bean at the Point of Injection
- 28.9. Giving Beans EL Names
- 28.10. Adding Setter and Getter Methods
- 28.11. Using a Managed Bean in a Facelets Page
- 28.12. Injecting Objects by Using Producer Methods
- 28.13. Configuring a CDI Application
- 28.14. Using the @PostConstruct and @PreDestroy Annotations With CDI Managed Bean Classes
- 28.14.1. To Initialize a Managed Bean Using the @PostConstruct Annotation
- 28.14.2. To Prepare for the Destruction of a Managed Bean Using the @PreDestroy Annotation
- 28.15. Further Information about CDI
- 29. Running the Basic Contexts and Dependency Injection Examples
- 29.1. The simplegreeting CDI Example
- 29.1.1. The simplegreeting Source Files
- 29.1.2. The Facelets Template and Page
- 29.1.3. Configuration Files
- 29.1.4. Running the simplegreeting Example
- 29.2. The guessnumber CDI Example
- 29.2.1. The guessnumber Source Files
- 29.2.2. The Facelets Page
- 29.2.3. Running the guessnumber Example
- 29.1. The simplegreeting CDI Example
- 30. Contexts and Dependency Injection for the Java EE Platform: AdvancedTopics
- 30.1. Using Alternatives in CDI Applications
- 30.1.1. Using Specialization
- 30.2. Using Producer Methods, Producer Fields, and Disposer Methods in CDI Applications
- 30.2.1. Using Producer Methods
- 30.2.2. Using Producer Fields to Generate Resources
- 30.2.3. Using a Disposer Method
- 30.3. Using Predefined Beans in CDI Applications
- 30.4. Using Events in CDI Applications
- 30.4.1. Defining Events
- 30.4.2. Using Observer Methods to Handle Events
- 30.4.3. Firing Events
- 30.5. Using Interceptors in CDI Applications
- 30.6. Using Decorators in CDI Applications
- 30.7. Using Stereotypes in CDI Applications
- 30.1. Using Alternatives in CDI Applications
- 31. Running the Advanced Contexts and Dependency Injection Examples
- 31.1. The encoder Example: Using Alternatives
- 31.1.1. The Coder Interface and Implementations
- 31.1.2. The encoder Facelets Page and Managed Bean
- 31.1.3. Running the encoder Example
- 31.2. The producermethods Example: Using a Producer Method To Choose a Bean Implementation
- 31.2.1. Components of the producermethods Example
- 31.2.2. Running the producermethods Example
- 31.3. The producerfields Example: Using Producer Fields to Generate Resources
- 31.3.1. The Producer Field for the producerfields Example
- 31.3.2. The producerfields Entity and Session Bean
- 31.3.3. The producerfields Facelets Pages and Managed Bean
- 31.3.4. Running the producerfields Example
- 31.4. The billpayment Example: Using Events and Interceptors
- 31.4.1. The PaymentEvent Event Class
- 31.4.2. The PaymentHandler Event Listener
- 31.4.3. The billpayment Facelets Pages and Managed Bean
- 31.4.4. The LoggedInterceptor Interceptor Class
- 31.4.5. Running the billpayment Example
- 31.5. The decorators Example: Decorating a Bean
- 31.5.1. Components of the decorators Example
- 31.5.2. Running the decorators Example
- 31.1. The encoder Example: Using Alternatives
- 32. Introduction to the Java Persistence API
- 32.1. Entities
- 32.1.1. Requirements for Entity Classes
- 32.1.2. Persistent Fields and Properties in Entity Classes
- 32.1.3. Primary Keys in Entities
- 32.1.4. Multiplicity in Entity Relationships
- 32.1.5. Direction in Entity Relationships
- 32.1.6. Embeddable Classes in Entities
- 32.2. Entity Inheritance
- 32.2.1. Abstract Entities
- 32.2.2. Mapped Superclasses
- 32.2.3. Non-Entity Superclasses
- 32.2.4. Entity Inheritance Mapping Strategies
- 32.3. Managing Entities
- 32.3.1. The EntityManager Interface
- 32.3.2. Persistence Units
- 32.4. Querying Entities
- 32.5. Further Information about Persistence
- 32.1. Entities
- 33. Running the Persistence Examples
- 33.1. The order Application
- 33.1.1. Entity Relationships in the order Application
- 33.1.2. Primary Keys in the order Application
- 33.1.3. Entity Mapped to More Than One Database Table
- 33.1.4. Cascade Operations in the order Application
- 33.1.5. BLOB and CLOB Database Types in the order Application
- 33.1.6. Temporal Types in the order Application
- 33.1.7. Managing the order Application’s Entities
- 33.1.8. Running the order Example
- 33.2. The roster Application
- 33.2.1. Relationships in the roster Application
- 33.2.2. Entity Inheritance in the roster Application
- 33.2.3. Criteria Queries in the roster Application
- 33.2.4. Automatic Table Generation in the roster Application
- 33.2.5. Running the roster Example
- 33.3. The address-book Application
- 33.3.1. Bean Validation Constraints in address-book
- 33.3.2. Specifying Error Messages for Constraints in address-book
- 33.3.3. Validating Contact Input from a JavaServer Faces Application
- 33.3.4. Running the address-book Example
- 33.1. The order Application
- 34. The Java Persistence Query Language
- 34.1. Query Language Terminology
- 34.2. Creating Queries Using the Java Persistence Query Language
- 34.2.1. Named Parameters in Queries
- 34.2.2. Positional Parameters in Queries
- 34.3. Simplified Query Language Syntax
- 34.3.1. Select Statements
- 34.3.2. Update and Delete Statements
- 34.4. Example Queries
- 34.4.1. Simple Queries
- 34.4.2. Queries That Navigate to Related Entities
- 34.4.3. Queries with Other Conditional Expressions
- 34.4.4. Bulk Updates and Deletes
- 34.5. Full Query Language Syntax
- 34.5.1. BNF Symbols
- 34.5.2. BNF Grammar of the Java Persistence Query Language
- 34.5.3. FROM Clause
- 34.5.4. Path Expressions
- 34.5.5. WHERE Clause
- 34.5.6. SELECT Clause
- 34.5.7. ORDER BY Clause
- 34.5.8. GROUP BY and HAVING Clauses
- 35. Using the Criteria API to Create Queries
- 35.1. Overview of the Criteria and Metamodel APIs
- 35.2. Using the Metamodel API to Model Entity Classes
- 35.2.1. Using Metamodel Classes
- 35.3. Using the Criteria API and Metamodel API to Create Basic Typesafe Queries
- 35.3.1. Creating a Criteria Query
- 35.3.2. Query Roots
- 35.3.3. Querying Relationships Using Joins
- 35.3.4. Path Navigation in Criteria Queries
- 35.3.5. Restricting Criteria Query Results
- 35.3.6. Managing Criteria Query Results
- 35.3.7. Executing Queries
- 36. Creating and Using String-Based Criteria Queries
- 36.1. Overview of String-Based Criteria API Queries
- 36.2. Creating String-Based Queries
- 36.3. Executing String-Based Queries
- 37. Controlling Concurrent Access to Entity Data with Locking
- 37.1. Overview of Entity Locking and Concurrency
- 37.1.1. Using Optimistic Locking
- 37.2. Lock Modes
- 37.2.1. Setting the Lock Mode
- 37.2.2. Using Pessimistic Locking
- 37.1. Overview of Entity Locking and Concurrency
- 38. Using a Second-Level Cache with Java Persistence API Applications
- 38.1. Overview of the Second-Level Cache
- 38.1.2. Controlling Whether Entities May Be Cached
- 38.2. Specifying the Cache Mode Settings to Improve Performance
- 38.2.1. Setting the Cache Retrieval and Store Modes
- 38.2.2. Controlling the Second-Level Cache Programmatically
- 38.1. Overview of the Second-Level Cache
- 39. Introduction to Security in the Java EE Platform
- 39.1. Overview of Java EE Security
- 39.1.1. A Simple Application Security Walkthrough
- 39.1.2. Features of a Security Mechanism
- 39.1.3. Characteristics of Application Security
- 39.2. Security Mechanisms
- 39.2.1. Java SE Security Mechanisms
- 39.2.2. Java EE Security Mechanisms
- 39.3. Securing Containers
- 39.3.1. Using Annotations to Specify Security Information
- 39.3.2. Using Deployment Descriptors for Declarative Security
- 39.3.3. Using Programmatic Security
- 39.4. Securing the GlassFish Server
- 39.5. Working with Realms, Users, Groups, and Roles
- 39.5.1. What Are Realms, Users, Groups, and Roles?
- 39.5.2. Managing Users and Groups on the GlassFish Server
- 39.5.3. Setting Up Security Roles
- 39.5.4. Mapping Roles to Users and Groups
- 39.6. Establishing a Secure Connection Using SSL
- 39.6.1. Verifying and Configuring SSL Support
- 39.7. Further Information about Security
- 39.1. Overview of Java EE Security
- 40. Getting Started Securing Web Applications
- 40.1. Overview of Web Application Security
- 40.2. Securing Web Applications
- 40.2.1. Specifying Security Constraints
- 40.2.2. Specifying Authentication Mechanisms
- 40.2.3. Specifying an Authentication Mechanism in the Deployment Descriptor
- 40.2.4. Declaring Security Roles
- 40.3. Using Programmatic Security with Web Applications
- 40.3.1. Authenticating Users Programmatically
- 40.3.2. Checking Caller Identity Programmatically
- 40.3.3. Example Code for Programmatic Security
- 40.3.4. Declaring and Linking Role References
- 40.4. Examples: Securing Web Applications
- 40.4.1. To Set Up Your System for Running the Security Examples
- 40.4.2. The hello2_basicauth Example: Basic Authentication with a Servlet
- 40.4.3. The hello1_formauth Example: Form-Based Authentication with a JavaServer Faces Application
- 41. Getting Started Securing Enterprise Applications
- 41.1. Securing Enterprise Beans
- 41.1.1. Securing an Enterprise Bean Using Declarative Security
- 41.1.2. Securing an Enterprise Bean Programmatically
- 41.1.3. Propagating a Security Identity (Run-As)
- 41.1.4. Deploying Secure Enterprise Beans
- 41.2. Examples: Securing Enterprise Beans
- 41.2.1. The cart-secure Example: Securing an Enterprise Bean with Declarative Security
- 41.2.2. The converter-secure Example: Securing an Enterprise Bean with Programmatic Security
- 41.1. Securing Enterprise Beans
- 42. Java EE Security: AdvancedTopics
- 42.1. Working with Digital Certificates
- 42.1.1. Creating a Server Certificate
- 42.1.2. Adding Users to the Certificate Realm
- 42.1.3. Using a Different Server Certificate with the GlassFish Server
- 42.2. Authentication Mechanisms
- 42.2.1. Client Authentication
- 42.2.2. Mutual Authentication
- 42.3. Using Form-Based Login in JavaServer Faces Web Applications
- 42.3.1. Using j_security_check in JavaServer Faces Forms
- 42.3.2. Using a Managed Bean for Authentication in JavaServer Faces Applications
- 42.4. Using the JDBC Realm for User Authentication
- 42.4.1. To Configure a JDBC Authentication Realm
- 42.5. Securing HTTP Resources
- 42.6. Securing Application Clients
- 42.6.1. Using Login Modules
- 42.6.2. Using Programmatic Login
- 42.7. Securing Enterprise Information Systems Applications
- 42.7.1. Container-Managed Sign-On
- 42.7.2. Component-Managed Sign-On
- 42.7.3. Configuring Resource Adapter Security
- 42.7.4. To Map an Application Principal to EIS Principals
- 42.8. Configuring Security Using Deployment Descriptors
- 42.8.1. Specifying Security for Basic Authentication in the Deployment Descriptor
- 42.8.2. Specifying Non-Default Principal-to-Role Mapping in the Deployment Descriptor
- 42.1. Working with Digital Certificates
- 43. Introduction to Java EE Supporting Technologies
- 43.1. Transactions in Java EE Applications
- 43.2. Resources in Java EE Applications
- 43.2.1. The Java EE Connector Architecture and Resource Adapters
- 43.2.2. Java Database Connectivity Software
- 43.3. Java Message Service
- 44. Transactions
- 44.1. What Is a Transaction?
- 44.2. Container-Managed Transactions
- 44.2.1. Transaction Attributes
- 44.2.2. Rolling Back a Container-Managed Transaction
- 44.2.3. Synchronizing a Session Bean’s Instance Variables
- 44.2.4. Methods Not Allowed in Container-Managed Transactions
- 44.3. Bean-Managed Transactions
- 44.3.1. JTA Transactions
- 44.3.2. Returning without Committing
- 44.3.3. Methods Not Allowed in Bean-Managed Transactions
- 44.4. Transaction Timeouts
- 44.4.1. To Set a Transaction Timeout
- 44.5. Updating Multiple Databases
- 44.6. Transactions in Web Components
- 44.7. Further Information about Transactions
- 45. Resources and Resource Adapters
- 45.1. Resources and JNDI Naming
- 45.2. DataSource Objects and Connection Pools
- 45.3. Resource Injection
- 45.3.1. Field-Based Injection
- 45.3.2. Method-Based Injection
- 45.3.3. Class-Based Injection
- 45.4. Resource Adapters and Contracts
- 45.4.1. Management Contracts
- 45.4.2. Generic Work Context Contract
- 45.4.3. Outbound and Inbound Contracts
- 45.5. Metadata Annotations
- 45.6. Common Client Interface
- 45.7. Using Resource Adapters With Contexts and Dependency Injection for the Java EE Platform (CDI)
- 45.8. Further Information about Resources
- 46. The Resource Adapter Example
- 46.1. The Resource Adapter
- 46.2. The Message-Driven Bean
- 46.3. The Web Application
- 46.4. Running the mailconnector Example
- 46.4.1. Before You Deploy the mailconnector Example
- 46.4.2. To Build, Package, and Deploy the mailconnector Example Using NetBeans IDE
- 46.4.3. To Build, Package, and Deploy the mailconnector Example Using Ant
- 46.4.4. To Run the mailconnector Example
- 47. Java Message Service Concepts
- 47.1. Overview of the JMS API
- 47.1.1. What Is Messaging?
- 47.1.2. What Is the JMS API?
- 47.1.3. When Can You Use the JMS API?
- 47.1.4. How Does the JMS API Work with the Java EE Platform?
- 47.2. Basic JMS API Concepts
- 47.2.1. JMS API Architecture
- 47.2.2. Messaging Domains
- 47.2.3. Message Consumption
- 47.3. The JMS API Programming Model
- 47.3.1. JMS Administered Objects
- 47.3.2. JMS Connections
- 47.3.3. JMS Sessions
- 47.3.4. JMS Message Producers
- 47.3.5. JMS Message Consumers
- 47.3.6. JMS Messages
- 47.3.7. JMS Queue Browsers
- 47.3.8. JMS Exception Handling
- 47.4. Creating Robust JMS Applications
- 47.4.1. Using Basic Reliability Mechanisms
- 47.4.2. Using Advanced Reliability Mechanisms
- 47.5. Using the JMS API in Java EE Applications
- 47.5.1. Using @Resource Annotations in Enterprise Bean or Web Components
- 47.5.2. Using Session Beans to Produce and to Synchronously Receive Messages
- 47.5.3. Using Message-Driven Beans to Receive Messages Asynchronously
- 47.5.4. Managing Distributed Transactions
- 47.5.5. Using the JMS API with Application Clients and Web Components
- 47.6. Further Information about JMS
- 47.1. Overview of the JMS API
- 48. Java Message Service Examples
- 48.1. Writing Simple JMS Applications
- 48.1.1. A Simple Example of Synchronous Message Receives
- 48.1.2. A Simple Example of Asynchronous Message Consumption
- 48.1.3. A Simple Example of Browsing Messages in a Queue
- 48.1.4. Running JMS Clients on Multiple Systems
- 48.1.5. Undeploying and Cleaning the Simple JMS Examples
- 48.2. Writing Robust JMS Applications
- 48.2.1. A Message Acknowledgment Example
- 48.2.2. A Durable Subscription Example
- 48.2.3. A Local Transaction Example
- 48.3. An Application That Uses the JMS API with a Session Bean
- 48.3.1. Writing the Application Components for the clientsessionmdb Example
- 48.3.2. Creating Resources for the clientsessionmdb Example
- 48.3.3. Running the clientsessionmdb Example
- 48.4. An Application That Uses the JMS API with an Entity
- 48.4.1. Overview of the clientmdbentity Example Application
- 48.4.2. Writing the Application Components for the clientmdbentity Example
- 48.4.3. Creating Resources for the clientmdbentity Example
- 48.4.4. Running the clientmdbentity Example
- 48.5. An Application Example That Consumes Messages from a Remote Server
- 48.5.1. Overview of the consumeremote Example Modules
- 48.5.2. Writing the Module Components for the consumeremote Example
- 48.5.3. Creating Resources for the consumeremote Example
- 48.5.4. Using Two Application Servers for the consumeremote Example
- 48.5.5. Running the consumeremote Example
- 48.6. An Application Example That Deploys a Message-Driven Bean on Two Servers
- 48.6.1. Overview of the sendremote Example Modules
- 48.6.2. Writing the Module Components for the sendremote Example
- 48.6.3. Creating Resources for the sendremote Example
- 48.6.4. To Enable Deployment on the Remote System
- 48.6.5. To Use Two Application Servers for the sendremote Example
- 48.6.6. Running the sendremote Example
- 48.6.7. To Disable Deployment on the Remote System
- 48.1. Writing Simple JMS Applications
- 49. BeanValidation: AdvancedTopics
- 49.1. Creating Custom Constraints
- 49.1.1. Using the Built-In Constraints to Make a New Constraint
- 49.2. Customizing Validator Messages
- 49.2.1. The ValidationMessages Resource Bundle
- 49.3. Grouping Constraints
- 49.3.1. Customizing Group Validation Order
- 49.1. Creating Custom Constraints
- 50. Using Java EE Interceptors
- 50.1. Overview of Interceptors
- 50.1.1. Interceptor Classes
- 50.1.2. Interceptor Lifecycle
- 50.1.3. Interceptors and CDI
- 50.2. Using Interceptors
- 50.2.1. Intercepting Method Invocations
- 50.2.2. Intercepting Lifecycle Callback Events
- 50.2.3. Intercepting Timeout Events
- 50.3. The interceptor Example Application
- 50.3.1. Running the interceptor Example
- 50.1. Overview of Interceptors
- 51. Duke’s Bookstore Case Study Example
- 51.1. Design and Architecture of Duke’s Bookstore
- 51.2. The Duke’s Bookstore Interface
- 51.2.1. The Book Java Persistence API Entity
- 51.2.2. Enterprise Beans Used in Duke’s Bookstore
- 51.2.3. Facelets Pages and Managed Beans Used in Duke’s Bookstore
- 51.2.4. Custom Components and Other Custom Objects Used in Duke’s Bookstore
- 51.2.5. Properties Files Used in Duke’s Bookstore
- 51.2.6. Deployment Descriptors Used in Duke’s Bookstore
- 51.3. Running the Duke’s Bookstore Case Study Application
- 51.3.1. To Build and Deploy Duke’s Bookstore Using NetBeans IDE
- 51.3.2. To Build and Deploy Duke’s Bookstore Using Ant
- 51.3.3. To Run Duke’s Bookstore
- 52. Duke’s Tutoring Case Study Example
- 52.1. Design and Architecture of Duke’s Tutoring
- 52.2. Main Interface
- 52.2.1. Java Persistence API Entities Used in the Main Interface
- 52.2.2. Enterprise Beans Used in the Main Interface
- 52.2.3. Facelets Files Used in the Main Interface
- 52.2.4. Helper Classes Used in the Main Interface
- 52.2.5. Properties Files
- 52.2.6. Deployment Descriptors Used in Duke’s Tutoring
- 52.3. Administration Interface
- 52.3.1. Enterprise Beans Used in the Administration Interface
- 52.3.2. Facelets Files Used in the Administration Interface
- 52.4. Running the Duke’s Tutoring Case Study Application
- 52.4.1. Setting Up GlassFish Server
- 52.4.2. Running Duke’s Tutoring
- 53. Duke’s Forest Case Study Example
- 53.1. Design and Architecture of Duke’s Forest
- 53.1.1. The events Project
- 53.1.2. The entities Project
- 53.1.3. The dukes-payment Project
- 53.1.4. The dukes-resources Project
- 53.1.5. The Duke’s Store Project
- 53.1.6. The Duke’s Shipment Project
- 53.2. Building and Deploying the Duke’s Forest Case Study Application
- 53.2.1. Prerequisite Task
- 53.2.2. To Build and Deploy the Duke’s Forest Application Using NetBeans IDE
- 53.2.3. To Build and Deploy the Duke’s Forest Application Using Ant
- 53.3. Running the Duke’s Forest Application
- 53.3.1. To Register as a Duke’s Store Customer
- 53.3.2. To Purchase Products
- 53.3.3. To Approve Shipment of a Product
- 53.3.4. To Create a New Product
- 53.1. Design and Architecture of Duke’s Forest
Online LIVE Training Programming Course offered by INCAPROG ONLINE - www.incaprog.com - contacto@incaprog.com - Phone : (954) 727-3141