Gary Hessler CEO Open Source Integration, LLC
<ul><li>Overview of Apache Commons </li></ul><ul><li>Overview of APIs </li></ul><ul><li>Highlight Specific API </li></ul><...
<ul><li>Main Level Apache Project </li></ul><ul><li>http://commons.apache.org </li></ul><ul><li>Collection of frequently n...
<ul><li>Attributes – Runtime API to metadata  </li></ul><ul><li>BeanUtils – Wrapper around Reflection and Introspection AP...
<ul><li>Daemon – Unix Daemon-like Java code </li></ul><ul><li>DBCP – Database connection pool </li></ul><ul><li>DBUtils – ...
<ul><li>JCI – Java Compiler Interface </li></ul><ul><li>Jelly – Java and XML scripting and processing engine </li></ul><ul...
<ul><li>Modeler – JMX’s Model Mbeans </li></ul><ul><li>Net – Internet protocol suite </li></ul><ul><li>Pool – Object Pool ...
<ul><li>Validator – XML Data validation framework </li></ul><ul><li>VFS – Virtual File System </li></ul>© 2008 Open Source...
<ul><li>Compress – API for tar, zip, and bzip2 </li></ul><ul><li>CSV – Comma Separated File utilities </li></ul><ul><li>Ex...
<ul><li>OpenPGP – Sign and verify data using OpenPGP </li></ul><ul><li>Performance – Framework for MicroBench clients </li...
<ul><li>Plug-able logging framework </li></ul><ul><li>Pluggins provider for: </li></ul><ul><ul><li>Log4j </li></ul></ul><u...
<ul><li>General - Message Priorities/Levels </li></ul><ul><li>It is important to ensure that log message are appropriate i...
<ul><li>General - Default Message Priority/Level </li></ul><ul><ul><li>By default the message priority should be no lower ...
© 2008 Open Source Integration, LLC. All rights reserved. Carbon Severity Enum Commons Log Log4J JDK 1.4 Logger LogKit Fat...
<ul><li>Example of using Commons Logging </li></ul><ul><ul><li>Shows different logging levels </li></ul></ul><ul><ul><li>S...
<ul><li>Simple logging example </li></ul><ul><li>Can get quite elaborate with logging </li></ul><ul><ul><li>Use rolling fi...
<ul><li>Don’t reinvent the wheel </li></ul><ul><ul><li>Reduce time </li></ul></ul><ul><ul><li>Reduce expenses </li></ul></...
© 2008 Open Source Integration, LLC. All rights reserved. Questions ?
Upcoming SlideShare
Loading in …5
×

Apache Commons Overview

1,990 views

Published on

Presente to the Colorado Springs Open Source Users Group on March 27, 2008 by Gary Hessler.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,990
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
45
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • Welcome Talk about company 06/03/09
  • Apache Commons Overview

    1. 1. Gary Hessler CEO Open Source Integration, LLC
    2. 2. <ul><li>Overview of Apache Commons </li></ul><ul><li>Overview of APIs </li></ul><ul><li>Highlight Specific API </li></ul><ul><ul><li>Logging </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    3. 3. <ul><li>Main Level Apache Project </li></ul><ul><li>http://commons.apache.org </li></ul><ul><li>Collection of frequently needed utilities and APIs </li></ul><ul><li>Organization </li></ul><ul><ul><li>Components Repository </li></ul></ul><ul><ul><li>Sandbox Components </li></ul></ul><ul><ul><li>Dormant </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    4. 4. <ul><li>Attributes – Runtime API to metadata </li></ul><ul><li>BeanUtils – Wrapper around Reflection and Introspection APIs </li></ul><ul><li>Betwixt – Maps JavaBeans to XML </li></ul><ul><li>Chain – Chain of Responsibility Pattern </li></ul><ul><li>CLI – Command line interface </li></ul><ul><li>Codec – Encoders and Decoders </li></ul><ul><li>Collections – Extends JDK collections API </li></ul><ul><li>Configuration – Reads config files in various formats </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    5. 5. <ul><li>Daemon – Unix Daemon-like Java code </li></ul><ul><li>DBCP – Database connection pool </li></ul><ul><li>DBUtils – JDBC helper library </li></ul><ul><li>Digester – XML configuration </li></ul><ul><li>Discovery – Locates pluggable interfaces </li></ul><ul><li>EL – Expression language interpreter </li></ul><ul><li>Email – Java e-mail library </li></ul><ul><li>FileUpload – HTML Form-based file upload </li></ul><ul><li>IO – Collection of IO utilities </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    6. 6. <ul><li>JCI – Java Compiler Interface </li></ul><ul><li>Jelly – Java and XML scripting and processing engine </li></ul><ul><li>Jexl – Expression language engine </li></ul><ul><li>JXPath – XPath interpreter </li></ul><ul><li>Lang – Extension of the java.lang package </li></ul><ul><li>Launcher – Java application launcher </li></ul><ul><li>Logging – Logging wrapper </li></ul><ul><li>Math – Math and statistics components </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    7. 7. <ul><li>Modeler – JMX’s Model Mbeans </li></ul><ul><li>Net – Internet protocol suite </li></ul><ul><li>Pool – Object Pool </li></ul><ul><li>Primitives – Improved classes for working with primitive types </li></ul><ul><li>Proxy – Library for creating dynamic proxies </li></ul><ul><li>SCXML – A Java SCXML engine </li></ul><ul><li>Transaction – Transaction library for files, collections, etc. </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    8. 8. <ul><li>Validator – XML Data validation framework </li></ul><ul><li>VFS – Virtual File System </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    9. 9. <ul><li>Compress – API for tar, zip, and bzip2 </li></ul><ul><li>CSV – Comma Separated File utilities </li></ul><ul><li>Exec – External process execution and environment management </li></ul><ul><li>Finder – Library like Unix find command </li></ul><ul><li>I18n – Localized message bundles </li></ul><ul><li>Id – Id generator </li></ul><ul><li>Javaflow – Captures the state of an application </li></ul><ul><li>Monitoring – Application monitoring instrumentation (Performance, threads) </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    10. 10. <ul><li>OpenPGP – Sign and verify data using OpenPGP </li></ul><ul><li>Performance – Framework for MicroBench clients </li></ul><ul><li>Pipeline – Pipeline utilities designed around work queues </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    11. 11. <ul><li>Plug-able logging framework </li></ul><ul><li>Pluggins provider for: </li></ul><ul><ul><li>Log4j </li></ul></ul><ul><ul><li>JDK 1.4 </li></ul></ul><ul><ul><li>Avalon Logkit </li></ul></ul><ul><ul><li>No Op </li></ul></ul><ul><ul><li>Simple </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    12. 12. <ul><li>General - Message Priorities/Levels </li></ul><ul><li>It is important to ensure that log message are appropriate in content and severity. The following guidelines are suggested: </li></ul><ul><li>FATAL - Severe errors that cause premature termination. Expect these to be immediately visible on a status console. </li></ul><ul><li>ERROR - Other runtime errors or unexpected conditions. Expect these to be immediately visible on a status console. </li></ul><ul><li>WARN - Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily &quot;wrong&quot;. Expect these to be immediately visible on a status console. </li></ul><ul><li>INFO - Interesting runtime events (startup/shutdown). Expect these to be immediately visible on a console, so be conservative and keep to a minimum. </li></ul><ul><li>DEBUG - Detailed information on flow of through the system. Expect these to be written to logs only. </li></ul><ul><li>TRACE - More detailed information. Expect these to be written to logs only. </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    13. 13. <ul><li>General - Default Message Priority/Level </li></ul><ul><ul><li>By default the message priority should be no lower than info. That is, by default debug message should not be seen in the logs. </li></ul></ul><ul><li>Why info level instead of debug? </li></ul><ul><ul><li>You want to have exception/problem information available for first-pass problem determination in a production level enterprise application without turning on debug as a default log level. </li></ul></ul><ul><ul><li>There is simply too much information in debug to be appropriate for day-to-day operations. </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    14. 14. © 2008 Open Source Integration, LLC. All rights reserved. Carbon Severity Enum Commons Log Log4J JDK 1.4 Logger LogKit Fatal Fatal Fatal Severe Fatal_Error Error Error Error Severe Error Warn Warn Warn Warning Warn Info Info Info Info Info Debug Debug Debug Fine Debug Trace Trace Debug Finest Debug
    15. 15. <ul><li>Example of using Commons Logging </li></ul><ul><ul><li>Shows different logging levels </li></ul></ul><ul><ul><li>Shows logging level checks </li></ul></ul><ul><ul><li>Shows exception logging </li></ul></ul><ul><ul><li>Includes 2 jars (Commons & Log4j) </li></ul></ul><ul><ul><li>Show simple Log4j configuration file </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    16. 16. <ul><li>Simple logging example </li></ul><ul><li>Can get quite elaborate with logging </li></ul><ul><ul><li>Use rolling file appenders </li></ul></ul><ul><ul><li>Log to XML </li></ul></ul><ul><ul><li>Log to database </li></ul></ul><ul><ul><li>Log to JMX </li></ul></ul><ul><ul><li>Log to JMS </li></ul></ul><ul><ul><li>Log to SMTP </li></ul></ul><ul><ul><li>Log to Socket </li></ul></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    17. 17. <ul><li>Don’t reinvent the wheel </li></ul><ul><ul><li>Reduce time </li></ul></ul><ul><ul><li>Reduce expenses </li></ul></ul><ul><li>Use as example code and a learning tool </li></ul><ul><li>Too much out there to know everything about libraries </li></ul><ul><li>Explore the commons website and experiment! </li></ul>© 2008 Open Source Integration, LLC. All rights reserved.
    18. 18. © 2008 Open Source Integration, LLC. All rights reserved. Questions ?

    ×