Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Java EE 7 Development with WildFly 1st

Edition Cmil Michal Matloka Michal


Marchioni Francesco
Visit to download the full and correct content document:
https://textbookfull.com/product/java-ee-7-development-with-wildfly-1st-edition-cmil-mi
chal-matloka-michal-marchioni-francesco/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Java EE 7 Development with NetBeans 8 1st Edition


Heffelfinger David R

https://textbookfull.com/product/java-ee-7-development-with-
netbeans-8-1st-edition-heffelfinger-david-r/

JBoss AS 5 Development 1st Edition Marchioni Francesco

https://textbookfull.com/product/jboss-as-5-development-1st-
edition-marchioni-francesco/

Java EE Development with Eclipse 1st Edition Vohra


Deepak

https://textbookfull.com/product/java-ee-development-with-
eclipse-1st-edition-vohra-deepak/

Java EE Development with Eclipse - Second Edition Ram


Kulkarni

https://textbookfull.com/product/java-ee-development-with-
eclipse-second-edition-ram-kulkarni/
De Profundis 2nd Edition Michal Oracz

https://textbookfull.com/product/de-profundis-2nd-edition-michal-
oracz/

Java EE 7 Recipes A Problem Solution Approach 1st


Edition Juneau Josh

https://textbookfull.com/product/java-ee-7-recipes-a-problem-
solution-approach-1st-edition-juneau-josh/

Mitochondrial Gene Expression: Methods and Protocols


Michal Minczuk

https://textbookfull.com/product/mitochondrial-gene-expression-
methods-and-protocols-michal-minczuk/

Handbook of Advanced Chromatography Mass Spectrometry


Techniques 1st Edition Michal Holcapek

https://textbookfull.com/product/handbook-of-advanced-
chromatography-mass-spectrometry-techniques-1st-edition-michal-
holcapek/

Introducing Java EE 7 A Look at What s New Juneau Josh

https://textbookfull.com/product/introducing-java-ee-7-a-look-at-
what-s-new-juneau-josh/
Java EE 7 Development
with WildFly

Leverage the power of the WildFly application server


from JBoss to develop modern Java EE 7 applications

Michał Ćmil
Michał Matłoka
Francesco Marchioni

BIRMINGHAM - MUMBAI
Java EE 7 Development with WildFly

Copyright © 2014 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the authors, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2013

Second edition: December 2014

Production reference: 1241214

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78217-198-0

www.packtpub.com

Cover image by Michael Jasej (milak6@wp.pl)


Credits

Authors Copy Editors


Michał Ćmil Gladson Monteiro
Michał Matłoka Adithi Shetty
Francesco Marchioni
Project Coordinator
Reviewers Akash Poojary
Dustin Kut Moy Cheung
Adam Dudczak Proofreaders
Ting Baker
Maxime Gréau
Simran Bhogal
Bartosz Majsak
Ameesha Green
Jakub Marchwicki

Indexers
Commissioning Editor
Rekha Nair
James Jones
Priya Sane

Acquisition Editor
James Jones Production Coordinator
Shantanu N. Zagade

Content Development Editor


Mohammed Fahad Cover Work
Shantanu N. Zagade

Technical Editors
Indrajit A. Das
Rohit Kumar Singh
About the Authors

Michał Ćmil is a Java developer with experience in web and desktop application
development. In the past, he has worked for the e-commerce sector. Currently,
he is developing manufacturing execution systems for industry clients. He has
been a volunteer at GeeCON. Michał works as a software designer/developer
for PSI Poland.

Michał Matłoka is a Java developer with experience in both Java EE and Spring
technologies. He is a JBoss community contributor, focusing mainly on Arquillian
and ShrinkWrap, and is also a winner of the JBoss Community Recognition Award
in 2013 for his contributions to ShrinkWrap. He has spoken at Poznan Java User
Group and volunteered at GeeCON. Michał is currently one of the 20 CEOs at
SoftwareMill, a fully distributed company with no main office and a completely
flat organization structure.
Francesco Marchioni is a Sun Certified Enterprise architect employed for an
Italian company based in Rome. He started learning Java in 1997, and since then he
has followed the path to the newest Application Program Interfaces released by Sun.
In 2000, he joined the JBoss community when the application server was running the
2.x release.

He has spent many years as a software consultant, where he has envisioned many
successful software migrations from vendor platforms to the open source products
such as JBoss AS, fulfilling the tight budget requirements of current times.

For the past 5 years, he has been authoring technical articles for O'Reilly Media and
also runs an IT portal focused on JBoss products (http://www.mastertheboss.com).

In December 2009, he authored JBoss AS 5 Development, Packt Publishing, which


describes how to create and deploy Java Enterprise applications on JBoss AS.

In December 2010, he authored his second title, JBoss AS 5 Performance Tuning, Packt
Publishing, which describes how to deliver fast and efficient applications on JBoss AS.

In December 2011, he authored yet another title, JBoss AS 7 Configuration Deployment


Administration, Packt Publishing, which covers all the aspects of the newest
application server release.

In August 2012, he coauthored the book, Infinispan Data Grid Platform, Packt
Publishing, with Manik Surtani, which covers all aspects related to the configuration
and development of applications using the Infinispan data grid platform.

I'd like to thank Packt Publishing for sharing the vision of this
new book and for all the effort they put in it. I'd also like to thank
my family for being always on my side, particularly, my wife for
allowing me to follow my book author ambitions, and my father for
buying me a C-64 instead of a motorcycle when I was young.
About the Reviewers

Dustin Kut Moy Cheung was born and raised in the island of Mauritius.
His interest in computers was sparked when he got his first computer at the age of
nine. He went on to study Electrical Engineering at McGill University in Montreal,
Canada. Dustin is currently working as a productization engineer in the JBoss
productization team at Red Hat.

I would like to thank the authors for giving me the opportunity to


be one of the reviewers for this book. Java EE 7 has certainly made
web development in Java easier and more elegant. Using the Wildfly
application server will enable users to fully unlock all the capabilities
that Java EE has to offer while providing easy administration,
configuration, deployment, clustering, and much more!

Adam Dudczak is an experienced software engineer working with Java and


related technologies since 2004. He is interested in the creation of lightweight,
bulletproof, and scalable applications. He has a strong background in information
retrieval and text mining. Currently, he is working on a better search experience
in one of the major east European e-commerce portals. He is one of the leaders of
Poznań JUG (http://www.jug.poznan.pl) and a co-organizer of the GeeCON
conference (http://geecon.org). Adam is a father and husband and occasionally
blogs at http://dudczak.info/dry. His Twitter handle is @maneo.
Maxime Gréau has been building software professionally for about 12 years,
mostly for the Web and most of it with Java. He wrote a French book about Apache
Maven 3 in 2011. He currently works as a Java EE architect.

Maxime is a speaker at conferences on Java and web technologies such as DevNation


and DevFest. He is also a technical reviewer.

He blogs at http://mgreau.com/blog/ and can be found on Twitter and GitHub


at @mgreau.

Bartosz Majsak works as a software developer at Cambridge Technology


Partners, based in Zurich. He is passionate about open source technologies and
testing methodologies. He is a proud JBoss Community Recognition award recipient
for 2012 and 2013. He's also an Arquillian team member and the lead for two
modules: Persistence Extension (makes writing database-oriented tests easier) and
Spock Test Runner (gives your Arquillian tests some BDD and Groovy love). One
thing that perhaps proves Bartosz is not a total geek is his addiction to alpine skiing.

Jakub Marchwicki has been in the software development industry for the past
10 years—wearing multiple hats, getting his hands dirty in multiple environments,
and securing both technical as well as the business side of The Thing, which is an
engineer with a human-friendly interface. Additionally, he has worked with a
variety of languages and frameworks.

Jakub has always considered programming a tool to solve real-life problems


in a pragmatic way. He has always stayed close to the business side of the solution,
focusing on the technology. He combines his daily job of managing a horde of
software engineers at Young Digital Planet with lectures, technical trainings,
and commitment to Gdańsk Java User Group.
www.PacktPub.com

Support files, eBooks, discount offers, and more


For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub
files available? You can upgrade to the eBook version at www.PacktPub.com and as a print
book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

TM

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib
today and view 9 entirely free books. Simply use your login credentials for immediate access.

Instant updates on new Packt books


Get notified! Find out when new books are published by following @PacktEnterprise on
Twitter or the Packt Enterprise Facebook page.
Table of Contents
Preface 1
Chapter 1: Getting Started with WildFly 7
An overview of Java EE and WildFly 8
WildFly and Enterprise Application Platform 9
Welcome to Java EE 7 9
JavaServer Faces 2.2 – JSR 344 10
Enterprise JavaBeans 3.2 – JSR 345 10
Java Persistence API 2.1 – JSR 338 11
Contexts and Dependency Injection for Java EE 1.1 – JSR 346 12
Java Servlet API 3.1 – JSR 340 12
JAX-RS, the Java API for RESTful Web Services 2.0 – JSR 339 13
Java Message Service 2.0 – JSR 343 13
Bean Validation 1.1 – JSR 349 14
Concurrency utilities for Java EE 1.0 – JSR 236 14
Batch applications for the Java Platform 1.0 – JSR 352 14
Java API for JSON Processing 1.0 – JSR 353 14
Java API for WebSocket 1.0 – JSR 356 15
New features in WildFly 15
Installing the server and client components 16
Installing Java SE 16
Testing the installation 17
Installing WildFly 17
Starting WildFly 18
Connecting to the server with the command-line interface 21
Stopping WildFly 22
Restarting WildFly 23
Installing the Eclipse environment 23
Installing JBoss Tools 24
Alternative development environments 26
Installing Maven 27
Testing the installation 27
Summary 28
Table of Contents

Chapter 2: Your First Java EE Application on WildFly 29


WildFly 8 core concepts 29
The WildFly 8 directory layout 32
Managing the application server 35
Managing WildFly 8 with the web interface 35
Launching the web console 37
Deploying your first application to WildFly 8 40
Advanced Eclipse deployment options 46
Managing deployments with the web console 47
Deploying applications using the command-line interface 52
Deploying applications to a domain 54
Summary 55
Chapter 3: Introducing Java EE 7 – EJBs 57
EJB 3.2 – an overview 57
Developing singleton EJBs 60
Configuring the EJB project object module (pom.xml) 67
Coding our EJB application 69
Controlling bean concurrency 72
Using bean-managed concurrency 73
Cooking session beans 74
Adding a stateless bean 74
Adding a stateful bean 75
Deploying the EJB application 77
Creating a remote EJB client 80
Configuring the client's project object module 82
Coding the EJB client 84
Adding the EJB client configuration 87
Running the client application 88
Adding user authentication 91
Using the EJB timer service 93
Programmatic timer creation 93
Scheduling timer events 94
Adding asynchronous methods to our EJBs 96
Using fire-and-forget asynchronous calls 97
Returning a Future object to the client 97
Summary 100
Chapter 4: Learning Context and Dependency Injection 101
Introducing Contexts and Dependency Injection 102
Named beans 104
CDI scopes 105
WildFly CDI implementation 106

[ ii ]
Table of Contents

Rethinking your ticketing system 108


Adding the required dependencies 109
Creating the beans 110
Building the view 115
Getting ready to run the application 120
Combining the scheduler into our application 123
Are EJBs and JSF Managed Beans obsolete? 131
Summary 132
Chapter 5: Combining Persistence with CDI 133
Data persistence meets the standard 134
Working with JPA 134
Adding persistence to our application 135
Setting up the database 135
Installing the JDBC driver in WildFly 136
Using the command-line interface to create a new data source 138
Creating the Maven project 138
Adding the Maven configuration 139
Cooking entities 139
Adding Bean Validation 141
Configuring persistence 144
Adding producer classes 146
Coding queries for your application 149
Adding services to your application 151
Adding a controller to drive user requests 154
Coding the JSF view 157
Running the example 165
Summary 168
Chapter 6: Developing Applications with JBoss JMS Provider 169
A short introduction to JMS 170
The building blocks of JMS 172
The JBoss messaging subsystem 173
Creating and using connection factories 174
Using JMS destinations 176
Adding message-driven beans to your application 178
Cooking message-driven beans 181
Adding the JMS producer 182
Compiling and deploying the application 186
Specifying which message to receive using selectors 187
Transaction and acknowledgment modes 189
Using JMS to integrate with external systems 190

[ iii ]
Table of Contents

A real-world example – HornetQ and ActiveMQ integration 191


Installing the ActiveMQ resource adapter 192
Consuming ActiveMQ messages 195
Summary 199
Chapter 7: Adding Web Services to Your Applications 201
Developing SOAP-based web services 202
Strategies to build SOAP-based web services 203
JBoss SOAP-based web services stack 203
A brief look at the JAX WS architecture 204
Coding SOAP web services with WildFly 205
Developing a POJO web service 206
Inspecting the web service from the console 208
Testing our simple web service 209
EJB3 Stateless Session Bean (SLSB) web services 211
Developing a web service consumer 213
Developing REST-based web services 215
Accessing REST resources 216
JBoss REST web services 217
Activating JAX-RS 217
Adding REST to our ticket example 218
Adding filters 221
Consuming our REST service 224
Compiling our ticket example 226
Adding AngularJS 227
Choosing between SOAP and REST services 234
Summary 235
Chapter 8: Adding WebSockets 237
An overview of WebSockets 238
How do WebSockets work 239
Creating our first endpoint 243
Expanding our client application 244
Transforming POJOs to JSON 249
An alternative to WebSockets 252
Summary 252
Chapter 9: Managing the Application Server 253
Entering the WildFly CLI 253
Launching the CLI 253
Connecting from remote hosts 254
Using a CLI in the graphical mode 255
Constructing CLI commands 256
Determining the resource address 256

[ iv ]
Table of Contents

Performing operations on resources 257


Deploying applications using the CLI 260
Deploying applications to a WildFly domain 261
Deploying to all server groups 261
Deploying to a single server group 262
Creating CLI scripts 263
Deploying an application to several WildFly nodes 263
Restarting servers in a domain 263
Installing a data source as a module 264
Adding JMS resources 265
Using advanced languages to create powerful CLI scripts 265
Using scripting languages to wrap CLI execution 266
Using the raw management API to manage the application server 269
Reading management model descriptions via the
raw management API 270
Creating your resource watches using the detyped API 271
Role-based security 273
Auditing administrative operations 277
Patching a running instance 277
Summary 278
Chapter 10: Securing WildFly Applications 279
Approaching the Java security API 280
The WildFly security subsystem 281
Setting up your first login module 284
Using the login module in the Ticket web application 285
Switching to FORM-based security 287
Creating a Database login module 289
Encrypting passwords 290
Using the Database login module in your application 291
Securing EJBs 291
Securing web services 295
Securing the transport layer 297
Enabling the Secure Socket Layer on WildFly 300
Certificate management tools 300
Securing the HTTP communication with a self-signed certificate 301
Generating the server and client certificates 302
Creating an SSL-aware security realm 303
Securing HTTP communication with a certificate signed by a CA 306
Securing EJB communication 307
Connecting to an SSL-aware security realm 308
Summary 309

[v]
Table of Contents

Chapter 11: Clustering WildFly Applications 311


Clustering basics 311
WildFly clustering 312
Starting a cluster of standalone nodes 313
Starting a cluster of domain nodes 314
The domain controller configuration 314
Host configurations 317
Deploying clustered applications 320
Creating HA Stateful Session Beans 320
Clustering the Ticket example 322
Turning your cache into a distributed cache 323
Coding the cluster-aware remote client 326
Deploying and testing high availability 327
Web application clustering 330
Load balancing your web applications 330
Installing mod_cluster 332
Clustering your web applications 335
Summary 338
Chapter 12: Long-term Tasks' Execution 339
The overview of the batching framework 340
Our first batch job 340
Creating a chunk-based batch step 342
Creating a job-based batch step 348
Using concurrency utilities in Java EE 350
Introducing threads to enterprise beans 354
Summary 362
Chapter 13: Testing Your Applications 363
Test types 363
Instruments used for testing 365
Getting started with Arquillian 366
Writing an Arquillian test 367
Configuring the pom.xml file 367
Writing your first Arquillian test 369
Running Arquillian TicketTest 371
Running Arquillian tests using Spock 373
ShrinkWrap Resolver 374

[ vi ]
Table of Contents

ShrinkWrap Descriptors 378


Persistence testing 379
Arquillian Warp 381
WebSockets testing 384
Enhancing your Arquillian test 386
Additional information 389
Summary 389
Appendix: Rapid Development Using JBoss Forge 391
Installing Forge 391
Starting Forge 392
Creating your first Java EE 7 application with JBoss Forge 393
Building and deploying the application 398
Your Forge-demo application in action 399
Index 401

[ vii ]
Getting Started with WildFly

Contexts and Dependency Injection for


Java EE 1.1 – JSR 346
Version 1.1 of Contexts and Dependency Injection (CDI) provides improvements
for the issues identified in CDI after its introduction in Java EE 6. The process
of simplifying the programming model started in Version 1.0 and is now being
continued. The areas covered by the update are as follows:

• CDI is now enabled by default (without the need to add the bean.xml file
to the deployment), with the possibility to specify the desired component
scanning mode.
• More fine-grained control over the bean discovery mechanism is now
available for the developer, thanks to the use of the @Vetoed annotation
and class or packages filters in beans.xml. Interceptors, decorators, and
alternatives can now be globally enabled for the whole application using
the @Priority annotation, instead of enabling every module.
• Event metadata can now be examined when a CDI event is handled.
• Interceptors have been enhanced with the possibility to be executed around
constructor invocation.
• Finally, the new version contains a significant number of enhancements for
the development of portable extensions.

Weld is the CDI implementation internally used in WildFly.

Java Servlet API 3.1 – JSR 340


The new version of the Java Servlet API has a clear focus on new features. The most
important of them is the HTTP upgrade mechanism, which allows the client and server
to start a conversation in HTTP 1.1, and negotiate another protocol for subsequent
requests. This feature was used to implement the WebSockets mechanism in Java EE 7.
Other features of the new version of specification are as follows:

• Non-blocking I/O API for Servlets has been provided to improve scalability
of web applications
• Multiple security improvements have been introduced; the most notable
of them is the possibility to set the default security semantics for all
HTTP methods

[ 12 ]
Another random document with
no related content on Scribd:
property infringement, a defective or damaged disk or other
medium, a computer virus, or computer codes that damage or
cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES -


Except for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU
AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE,
STRICT LIABILITY, BREACH OF WARRANTY OR BREACH
OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE
TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER
THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR
ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE
OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF
THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If


you discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person or
entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you do
or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.
Volunteers and financial support to provide volunteers with the
assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status by
the Internal Revenue Service. The Foundation’s EIN or federal
tax identification number is 64-6221541. Contributions to the
Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or
determine the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like