Apache Commons

Apache Commons is a project of the Apache Software Foundation with the aim to create general-purpose class libraries for the Java programming language. Because the libraries are under the Apache License Version 2.0, they can also be used in commercial projects. The focus is on the independence of other libraries and server -related functions. Prior to the restructuring of the Foundation libraries were built under the name Jakarta Commons.

Structuring

Since the project from many individual libraries is, confined to a very limited scope of duties, they are within a project according to their ripeness distinguished. Libraries that have achieved the status Proper ( neat English), are an official part of the Commons. Projects that are already functional, but do not yet meet the necessary criteria will be out in the sandbox (English sandpit). All other libraries are still in the design or whose care is not guaranteed to be categorized ( dormant English) as Dormant.

The following official (proper ) component contains the Apache Commons:

  • File Upload - for uploading files in web applications
  • Net - collection of utilities and protocol implementations for network communication
  • EL - interpreter for the JSP 2.0 Expression Language
  • Email - library for sending emails from Java
  • Imaging - library for reading, parsing and writing of various image formats (formerly called Sans Elan )
  • JEXL - Expression Language extension to the Java Server Pages Standard Tag Library
  • Betwixt - Services for mapping JavaBeans to XML and vice versa
  • Digester - XML to Java mapping
  • Jelly - XML based scripting and processing engine
  • JXPath - Tools for manipulating JavaBeans using the XPath syntax
  • BCEL - library for the generation, manipulation and analysis of Java bytecode
  • Beanutils - wrapper classes for Java Reflection and Introspection for manipulating JavaBeans
  • Bean Scripting Framework (BSF ) - interface to scripting languages ​​, including JSR -223
  • CSV - component for reading and writing CSV files
  • Pool - generic object pooling component
  • Validator - Framework for the definition of validators and their rules using XML files
  • Daemon - alternative mechanism for calling a Unix daemon -like Java code
  • Discovery - Tools for the location of resources through mapping of the resource name to service or References
  • Exec - API for the treatment of external processes and management of the execution environment in Java
  • Launcher - platform independent launcher for launching applications from Java
  • Java Compiler Interface ( JCI) - library for compiling code into Java bytecode
  • Modeler - Tools that allow easy creation of MBeans for the Java Management Extensions
  • Object Graph Navigation Language ( OGNL ) - API for navigating through the Java object tree
  • Executes implementation of a state engine that states defined according SCXML specification and state transitions - State Chart XML ( SCXML )
  • Chain - implementation of the Chain of Responsibility design patterns
  • Codec - implementation of generic Encoding-/Decoding-Algorithmen such as Phonetic, Base64, URL
  • Compress - API for working with tar, zip and bzip2 files
  • Command Line Interpreter ( CLI) - Parser for command line arguments
  • Configuration - Access to configuration and preferences files in various formats
  • Collections - extension of the Java Collections Framework, Version 4 with Generics
  • Database Connection Pool ( DBCP ) - Services for database connection pools
  • DbUtils - Extensions to JDBC
  • Represent implementation of functional objects, objects, functions - Functor
  • IO - collection of input / output utilities
  • Java Caching System ( JCS ) - Framework for Distributed Cache
  • Long - extending the functionalities of the classes from java.lang
  • Logging - wrapper around a number of logging frameworks
  • Math - components for mathematical and statistical functions
  • Primitives - collections of primitive types in Java without autoboxing
  • Proxy - library for generating dynamic proxies
  • VFS - component for handling files, FTP, SMB, Zip, etc. as a logical, virtual file system

Common Libraries

Among the most important part of libraries ' collections Commons ", which the Java Collections Framework expanded the range of classes for managing databases. The last release is from 2008, but still does not support Java generics (Java 5 and later), which considerably restricts the usability. The library " Commons Lang" extends the basic features of the package java.lang, in which the basic classes of Java are to many useful classes and their methods. With the help of " Commons Logging" is a unified API for various logging class libraries created such as log4j or java.util.logging. For more general extensions to the standard libraries of Java include:

  • Commons Beanutils
  • Commons CLI
  • Commons Configuration
  • Commons Math

Libraries for web applications

Some of the libraries are designed specifically for Web applications to make it easier for developers to implement recurring tasks with little effort. Thus, Commons Net many well-known protocols such as FTP, POP3 or Telnet available while Commons FileUpload for servlets and web applications provides a simple mechanism for uploading files. The following list shows some other interesting web application libraries:

  • Commons IO
  • Commons Transaction

Not more to it Commons HttpClient, since that element was passed to the parent Jakarta project in 2004 and since 2007 even rose to a standalone top-level project.

Libraries for XML processing

As used frequently on servers JavaBeans Commons Betwixt provides, in both directions possible, mapping XML structures to Java Beans. Commons Digester is dedicated to the initialization of Java objects from XML data, while Commons Jelly enables the execution of an XML-based scripting language.

Libraries for database access

Apache Commons DB Utils offers enhancements and simplifications to access databases using Java Database Connectivity ( JDBC). For example, it enables the automatic conversion of the data supplied from the database into Java Beans or closes the database connections automatically. To avoid obstructing the database access code will be reduced to the essential parts and thus more understandable and maintainable.

Can open a database connection a long time ( sometimes several seconds). That's why most programs access to database connection pools, keep multiple database connections and the connections do not close at the end of transactions, but keep it open for further database accesses which. Apache Commons DBCP, providing a pool of database connections, based on Apache Commons Pool, which manages the pool itself.

4115
de