售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
JBoss AS 7 Development
Table of Contents
JBoss AS 7 Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with JBoss AS 7
An overview of Java EE and JBoss AS 7
Welcome to Java EE 6
JavaServer Faces (JSF) 2.0
Enterprise JavaBeans (EJB) 3.1
Java Persistence API (JPA) 2.0
Contexts and Dependency Injection for Java
Java Servlet API 3.0
Java API for web services (JAX-RS and JAX-WS)
Java API for XML-based web services (JAX-WS)
Java architecture for XML Binding (JAXB) 2.2
New features in JBoss AS 7
Installing the server and client components
Installing Java SE
Testing the installation
Installing JBoss AS 7
Starting up JBoss AS
Connecting to the server with the Command Line Interface
Stopping JBoss
Locating the shutdown script
Stopping JBoss on a remote machine
Restarting JBoss
Installing the Eclipse environment
Installing JBoss Tools
Alternative development environments
Installing Maven
Testing the installation
Summary
2. What's New in JBoss AS 7
AS 7 core concepts
The AS 7 filesystem
Managing the application server
Managing JBoss AS 7 with the web interface
Launching the web console
Deploying your first application to JBoss AS 7
Advanced Eclipse deployment options
Managing deployments with the web console
Changing the deployment scanner properties
Deploying applications using the CLI
Deploying applications to a domain
Summary
3. Beginning Java EE 6 – EJBs
EJB 3.1 – new features
Developing singleton EJBs
Configuring the project object module (pom.xml)
Coding our EJB application
Controlling bean concurrency
Using bean-managed concurrency
Cooking session beans
Adding a stateless bean
Adding a stateful bean
Deploying the EJB application
Creating a remote EJB client
Configuring the client's project object module
Coding the EJB client
Adding EJB client configuration
Running the client application
Adding user authentication
Using the EJB timer service
Programmatic timer creation
Scheduling timer events
Adding asynchronous methods to our EJBs
Using fire-and-forget asynchronous calls
Returning a Future object to the client
Summary
4. Learning Context Dependency Injection
Introducing Context and Dependency Injection
Named beans
CDI scopes
JBoss AS CDI implementation
Rethinking your ticketing system
Adding the required dependencies
Coding the beans
Building the view
JSF 2 facet suggestions
Getting ready to run the application
Combining the scheduler into our application
Installing RichFaces
Making your application rich
Running the application
Are EJBs and JSF Managed Beans obsolete?
Summary
5. Combining Persistence with CDI
Data persistence meets a standard
Working with JPA
Adding persistence to our application
Setting up the database
Installing the JDBC driver on JBoss AS 7
Using the command-line interface to create a new data source
Creating the Maven project
Adding Maven configuration
Cooking entities
Adding JavaBeans Validation
Configuring persistence
Adding producer classes
Coding queries for your application
Adding services to your application
Adding a controller to drive user requests
Coding the JSF view
Running the example
Summary
6. Testing Your Applications
Unit testing and integration testing
Instruments for testing
Getting started with Arquillian
Writing an Arquillian test
Configuring the pom.xml file
Writing your first Arquillian test
Running Arquillian TicketTest
Running Arquillian TicketTest with a managed container
Enhancing your Arquillian test
Additional information
Summary
7. Developing Applications with JBoss JMS Provider
A short introduction to JMS
The building blocks of JMS
The JBoss messaging subsystem
Creating and using connection factories
Using JMS destinations
Adding message-driven beans to your application
Cooking message-driven beans
Adding the JMS producer
Compiling and deploying the application
Optimizing JMS connections
Specifying which message to receive using selectors
Using JMS to integrate with external systems
A real-world example – HornetQ and ActiveMQ integration
Installing the ActiveMQ resource adapter
Consuming ActiveMQ messages
Summary
8. Adding Web Services to Your Applications
Developing SOAP-based web services
Strategies for building SOAP web services
JBoss SOAP web services stack
A brief look at the JAX WS architecture
Coding SOAP web services with JBoss AS 7
Developing a POJO web service
Inspecting the web service from the console
Testing our simple web service
EJB3 Stateless Session Beans (SLSB) web services
Developing a web service consumer
Compiling the example
Developing REST-based web services
Accessing REST resources
JBoss REST web services
Activating RESTEasy
Adding REST to our Ticket example
Consuming our REST service
Compiling our Ticket example
Choosing between SOAP and REST services
Summary
9. Managing the Application Server
Entering the JBoss Command Line Interface (CLI)
Launching the CLI
Connecting from remote hosts
Using the CLI in the graphical mode
Constructing the CLI commands
Determining the resource address
Performing operations on resources
Using the tab completion helper
Deploying applications using the CLI
Deploying applications to a JBoss AS 7 domain
Deploy to all server groups
Deploy to a single server group
Creating CLI scripts
Deploying an application to several JBoss AS 7 nodes
Restarting servers in a domain
Installing a datasource as a module
Adding JMS resources
Using advanced languages to create powerful CLI scripts
Using scripting languages to wrap CLI execution
Using the raw management API to manage the application server
Reading management model descriptions via the raw management API
Creating your resource watches using the detyped API
Summary
10. Clustering JBoss AS 7 Applications
Clustering basics
JBoss AS 7 clustering
Starting a cluster of standalone nodes
Starting a cluster of domain nodes
The domain controller configuration
Host configurations
Deploying clustered applications
Clustering EJBs
Creating HA Stateful Session Beans
Clustering the Ticket example
Turning your cache into a distributed cache
Coding the cluster-aware remote client
Deploying and testing high availability
Web application clustering
Load balancing your web applications
Installing mod_cluster
Clustering your web applications
Programming considerations to achieve HA
Achieving HA in JSF applications
Summary
11. Securing JBoss AS 7 Applications
Approaching the Java security API
JBoss AS 7 security subsystem
Setting up your first login module
Using the login module in the Ticket web application
Switching to FORM-based security
Creating a Database login module
Encrypting passwords
Using the Database login module in your application
Securing EJBs
Securing web services
Securing the transport layer
Enabling the Secure Socket Layer on JBoss AS
Certificate management tools
Securing the HTTP communication with a self-signed certificate
Securing HTTP communication with a certificate signed by a CA
Securing EJB communication
Generating the server and client certificates
Creating an SSL-aware security realm
Creating an SSL-aware security realm
Summary
A. Rapid Development Using JBoss Forge
Installing Forge
Starting Forge
Creating your first Java EE 6 application with JBoss Forge
Building and deploying the application
Your forge-demo application in action
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜