Cocoon 2.2 Classic

Total Page:16

File Type:pdf, Size:1020Kb

Cocoon 2.2 Classic Using Cocoon 2.2 Vadim Gritsenko - http://blog.reverycodes.com/ - http://agilepartners.com/blog/ Using Cocoon 2.2 The Classic Way Vadim Gritsenko - http://blog.reverycodes.com/ - http://agilepartners.com/blog/ If you use Cocoon 2.1: In multiple software projects Built multiple reusable, shared software modules Have standardized directory structure, build, deployment processes... If you think of Cocoon 2.2: Ant has been replaced with Maven LogKit has been replaced by Log4J Avalon is being replaced by Spring Framework ‘Real Blocks’ are almost here No downloads (so far) If you think of Cocoon 2.2: Ant has been replaced with Maven LogKit has been replaced by Log4J Avalon is being replaced by Spring Framework ‘Real Blocks’ are almost here No downloads (so far) You don’t have to start from scratch! It’s not that scary. Ant has been replaced with Maven You don’t have to use it. LogKit has been replaced by Log4J You don’t have to use it. Avalon is being replaced by Spring Framework You don’t have to use it. No downloads (so far) Oops... You’d have to use Maven for that... So how does it look? Your Application sitemap.xmap Components Sitemap cocoon.xconf Avalon Bridge Pipelines Spring Framework applicationContext.xml Web Application web.xml Building Cocoon $ svn co http://svn.apache.org/repos/ Install latest asf/cocoon/trunk cocoon maven 2 U cocoon Checked out revision 577959. Check out code from the svn $ mvn -P allblocks install java.lang.OutOfMemoryError: Java heap repository space Start maven build process Get coffee or beer (might take a while) Building Cocoon $ svn co http://svn.apache.org/repos/ Install latest asf/cocoon/trunk cocoon maven 2 U cocoon Checked out revision 577959. Check out code from the svn $ mvn -P allblocks install java.lang.OutOfMemoryError: Java heap repository space Start maven $ export MAVEN_OPTS=-Xmx256m build process $ mvn -Dmaven.test.skip=true -P allblocks install Get coffee or [INFO] BUILD SUCCESSFUL beer (might take a while) Building Cocoon ...but only if you want it! $ svn co http://svn.apache.org/repos/ Install latest asf/cocoon/trunk cocoon maven 2 U cocoon Checked out revision 577959. Check out code from the svn $ mvn -P allblocks install java.lang.OutOfMemoryError: Java heap repository space Start maven $ export MAVEN_OPTS=-Xmx256m build process $ mvn -Dmaven.test.skip=true -P allblocks install Get coffee or [INFO] BUILD SUCCESSFUL beer (might take a while) Selecting Blocks No more local.build.properties No more local.blocks.properties Use maven pom.xml file to select blocks Need to set a version for each block More typing but similar in nature Selecting Blocks <?xml version="1.0"<version>1.0.0-RC2-SNAPSHOT</version><artifactId>cocoon-fop-ng-impl</artifactId> encoding="UTF-8"?> </dependency> <version>1.0.0-SNAPSHOT</version> <project <dependency></dependency> xmlns="http://maven.apache.org/POM/4.0.0" No more <dependency> <groupId>org.apache.cocoon</groupId> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <artifactId>cocoon-forms-impl</artifactId><groupId>org.apache.cocoon</groupId> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 local.build.properties http://maven.apache.org/maven-v4_0_0.xsd <version>1.0.0-RC1-SNAPSHOT</version><artifactId>cocoon-poi-impl</artifactId>"> <modelVersion>4.0.0</modelVersion> </dependency> <version>1.0.0-SNAPSHOT</version> <groupId>org.reverycodes</groupId> </dependency> No more <artifactId>my-cocoon-webapp</artifactId> <dependency> <version>1.0.1-SNAPSHOT</version> ... <groupId>org.apache.cocoon</groupId> local.blocks.properties <packaging>war</packaging> <artifactId>cocoon-databases-impl</artifactId> <name>My </dependencies> <version>1.0.0-RC2-SNAPSHOT</version> Cocoon Webapp</name> </project> </dependency> Use maven pom.xml <build> <dependency> <finalName>my-cocoon-webapp</finalName> <groupId>org.apache.cocoon</groupId> </build> <artifactId>cocoon-repository-impl</artifactId> file to select blocks <version>1.0.0-SNAPSHOT</version> <dependencies> </dependency> <dependency> Need to set a version <dependency> <groupId>org.apache.cocoon</groupId> <artifactId>cocoon-core</artifactId><groupId>org.apache.cocoon</groupId> for each block <version>2.2.0-RC2-SNAPSHOT</version><artifactId>cocoon-batik-impl</artifactId> </dependency> <version>1.0.0-RC2-SNAPSHOT</version> <dependency></dependency> More typing but <dependency> <groupId>org.apache.cocoon</groupId> <artifactId>cocoon-template-impl</artifactId><groupId>org.apache.cocoon</groupId> similar in nature Assembling Cocoon $ ls pom.xml Install latest maven 2 $ export MAVEN_OPTS=-Xmx256m Start maven $ mvn war:war build process [INFO] BUILD SUCCESSFUL Get coffee or $ ls target beer (might take my-cocoon-webapp/ my-cocoon-webapp.war a while) Gets faster on subsequent runs Assembling Cocoon $ lsfind . -type f pom.xml./pom.xml Install latest ./src/main/webapp/WEB-INF/web.xml maven 2 $ export MAVEN_OPTS=-Xmx256m Start maven $ mvn war:war build process [INFO] BUILD SUCCESSFUL Get coffee or $ ls target beer (might take my-cocoon-webapp/ my-cocoon-webapp.war a while) Gets faster on subsequent runs Updating Webapp web.xml applicationContext.xml core.xml cocoon.xconf sitemap.xmap WEB-INF/lib Updating web.xml <!-- Servlet 2.4 - Web application configuration. --> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"> Updating web.xml <!-- Servlet 2.4 - WebDeclare application a filter configuration. for multipart MIME handling --> MIME Multipart <web-app<filter> xmlns="http://java.sun.com/xml/ns/j2ee" <description> version="2.4"> Servlet Filter Multipart MIME handling filter for Cocoon </description> <display-name> Cocoon multipart filter </display-name> <filter-name>CocoonMultipartFilter</filter-name> <filter-class> org.apache.cocoon.servlet.multipart.MultipartFilter </filter-class> </filter> Updating web.xml <!-- Servlet 2.4 - WebDeclareUse applicationthe aCocoon filter multipartconfiguration. for multipart filter MIME together handling with the --> Cocoon servlet MIME Multipart <web-app<filter> --> xmlns="http://java.sun.com/xml/ns/j2ee" <filter-mapping> <description> version="2.4"> Servlet Filter <filter-name>CocoonMultipartFilter</filter-name> Multipart MIME handling filter for Cocoon </description><servlet-name>Cocoon</servlet-name> </filter-mapping> <display-name> Filter Mapping Cocoon multipart filter </display-name> <filter-name>CocoonMultipartFilter</filter-name> <filter-class> org.apache.cocoon.servlet.multipart.MultipartFilter </filter-class> </filter> Updating web.xml <!-- Servlet 2.4 - WebDeclareUseSpring applicationthe requestaCocoon filter multipartlistenerconfiguration. for multipart ...filter MIME together handling with the --> Cocoon servlet MIME Multipart <web-app<filter> <listener> --> xmlns="http://java.sun.com/xml/ns/j2ee" <filter-mapping> <description><listener-class> version="2.4"> Servlet Filter org.springframework.web.context.request.RequestConte <filter-name>CocoonMultipartFilter</filter-name> Multipart MIME handling filter for Cocoon xtListener </description><servlet-name>Cocoon</servlet-name> </filter-mapping> <display-name></listener-class> Filter Mapping </listener> Cocoon multipart filter </display-name> Context <!-- <filter-name>CocoonMultipartFilter</filter-name> <filter-class>- Spring context listener ... Listeners org.apache.cocoon.servlet.multipart.MultipartFilter --> <listener> </filter-class> </filter> <listener-class> org.springframework.web.context.ContextLoaderListene r </listener-class> Updating web.xml <!-- Servlet 2.4 - WebDeclareUseSpring applicationthe requestaCocoonClassic filter multipartlistenerconfiguration. Cocoonfor multipart servlet ...filter MIME together handling with the --> Cocoon servlet MIME Multipart <web-app<filter> <listener><servlet> --> xmlns="http://java.sun.com/xml/ns/j2ee" <filter-mapping> <description><listener-class><servlet-name>Cocoon</servlet-name> version="2.4"> Servlet Filter org.springframework.web.context.request.RequestConte <filter-name>CocoonMultipartFilter</filter-name><display-name>Cocoon</display-name> Multipart MIME handling filter for Cocoon xtListener </description><servlet-name>Cocoon</servlet-name><description>Classic Cocoon Servlet</description> </filter-mapping> <display-name></listener-class><servlet-class> Filter Mapping </listener>org.apache.cocoon.servlet.SitemapServlet Cocoon multipart filter </display-name></servlet-class> Context <!-- <filter-name>CocoonMultipartFilter</filter-name><load-on-startup>5</load-on-startup> </servlet> <filter-class>- Spring context listener ... Listeners org.apache.cocoon.servlet.multipart.MultipartFilter --> <listener> </filter-class> and Cocoon </filter> <listener-class> org.springframework.web.context.ContextLoaderListene Servlet! r </listener-class> Complete web.xml <!-- - Web application configuration. --> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"> <!-- - Declare a filter for multipart MIME handling --> <filter> <description>Multipart MIME handling filter for Cocoon</description> <display-name>Cocoon multipart filter</display-name> <filter-name>CocoonMultipartFilter</filter-name> <filter-class>org.apache.cocoon.servlet.multipart.MultipartFilter</filter-class> </filter> <!-- - Declare a filter for debugging incoming request --> <filter> Debug filter <description>Log debug information about each request</description> <display-name>Cocoon debug filter</display-name> <filter-name>CocoonDebugFilter</filter-name> <filter-class>org.apache.cocoon.servlet.DebugFilter</filter-class> </filter> <!-- - Use the Cocoon multipart filter together with the Cocoon servlet --> <filter-mapping>
Recommended publications
  • Log4j-Users-Guide.Pdf
    ...................................................................................................................................... Apache Log4j 2 v. 2.2 User's Guide ...................................................................................................................................... The Apache Software Foundation 2015-02-22 T a b l e o f C o n t e n t s i Table of Contents ....................................................................................................................................... 1. Table of Contents . i 2. Introduction . 1 3. Architecture . 3 4. Log4j 1.x Migration . 10 5. API . 16 6. Configuration . 18 7. Web Applications and JSPs . 48 8. Plugins . 56 9. Lookups . 60 10. Appenders . 66 11. Layouts . 120 12. Filters . 140 13. Async Loggers . 153 14. JMX . 167 15. Logging Separation . 174 16. Extending Log4j . 176 17. Extending Log4j Configuration . 184 18. Custom Log Levels . 187 © 2 0 1 5 , T h e A p a c h e S o f t w a r e F o u n d a t i o n • A L L R I G H T S R E S E R V E D . T a b l e o f C o n t e n t s ii © 2 0 1 5 , T h e A p a c h e S o f t w a r e F o u n d a t i o n • A L L R I G H T S R E S E R V E D . 1 I n t r o d u c t i o n 1 1 Introduction ....................................................................................................................................... 1.1 Welcome to Log4j 2! 1.1.1 Introduction Almost every large application includes its own logging or tracing API. In conformance with this rule, the E.U.
    [Show full text]
  • Web Development with Java
    Web Development with Java Tim Downey Web Development with Java Using Hibernate, JSPs and Servlets Tim Downey, BS, MS Florida International University Miami, FL 33199, USA British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Control Number: 2007925710 ISBN: 978-1-84628-862-3 e-ISBN: 978-1-84628-863-0 Printed on acid-free paper © Springer-Verlag London Limited 2007 Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or transmitted, in any form or by any means, with the prior permission in writing of the pub- lishers, or in the case of reprographic reproduction in accordance with the terms of licences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers. The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a specifi c statement, that such names are exempt from the relevant laws and regulations and therefore free for general use. The publisher makes no representation, express or implied, with regard to the accuracy of the informa- tion contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that may be made. 9 8 7 6 5 4 3 2 1 Springer Science+Business Media springer.com To Bobbi, my sweetheart, with all my love. Preface I have been teaching web development for ten years.
    [Show full text]
  • Enterprise Development with Flex
    Enterprise Development with Flex Enterprise Development with Flex Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo Enterprise Development with Flex by Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky Copyright © 2010 Yakov Fain, Victor Rasputnis, and Anatole Tartakovsky.. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected]. Editor: Mary E. Treseler Indexer: Ellen Troutman Development Editor: Linda Laflamme Cover Designer: Karen Montgomery Production Editor: Adam Zaremba Interior Designer: David Futato Copyeditor: Nancy Kotary Illustrator: Robert Romano Proofreader: Sada Preisch Printing History: March 2010: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Enterprise Development with Flex, the image of red-crested wood-quails, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein.
    [Show full text]
  • Kony Mobilefabric Integration Service - Manual Upgrade Version 1.3
    Kony MobileFabricTM Integration Service - Manual Upgrade Release 7.2 Document Relevance and Accuracy This document is considered relevant to the Release stated on this title page and the document version stated on the Revision History page. Remember to always view and download the latest document version relevant to the software release you are using. © 2016 by Kony, Inc. All rights reserved 1 of 130 Kony MobileFabric Integration Service - Manual Upgrade Version 1.3 Copyright © 2013 by Kony, Inc. All rights reserved. October, 2016 This document contains information proprietary to Kony, Inc., is bound by the Kony license agreements and may not be used except in the context of understanding the use and methods of Kony Inc, software without prior, express, written permission. Kony, Empowering Everywhere, Kony MobileFabric, Kony Nitro, and Kony Visualizer are trademarks of Kony, Inc. Microsoft, the Microsoft logo, Internet Explorer, Windows, and Windows Vista are registered trademarks of Microsoft Corporation. Apple, the Apple logo, iTunes, iPhone, iPad, OS X, Objective-C, Safari, Apple Pay, Apple Watch and Xcode are trademarks or registered trademarks of Apple, Inc. Google, the Google logo, Android, and the Android logo are registered trademarks of Google, Inc. Chrome is a trademark of Google, Inc. BlackBerry, PlayBook, Research in Motion, and RIM are registered trademarks of BlackBerry. All other terms, trademarks, or service marks mentioned in this document have been capitalized and are to be considered the property of their respective owners. © 2016 by Kony, Inc. All rights reserved 2 of 130 Kony MobileFabric Integration Service - Manual Upgrade Version 1.3 Revision History Date Document Description of Modifications/Release Version 10/24/2016 1.3 Document updated for release 7.2 07/20/2016 1.2 Document updated for release 7.1 06/10/2016 1.1 Appended new section Upgrading Tomcat from 5.0.x to 7.0.x.
    [Show full text]
  • Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle Weblogic Server, 11G Release 1 (10.3.6) E13739-07
    Oracle® Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server 11g Release 1 (10.3.6) E13739-07 September 2013 This document describes how you use WebLogic Server logging services to monitor server, subsystem, and application events. Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server, 11g Release 1 (10.3.6) E13739-07 Copyright © 2007, 2013, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).
    [Show full text]
  • Licensing Information User Manual Release 9.0 Revision 1.2
    Oracle SD-WAN Edge Licensing Information User Manual Release 9.0 Revision 1.2 October 2020 Licensing Information User Manual Oracle SD-WAN Edge 8.2 Oracle SD-WAN Edge Licensing Information ser !an"al# Release 9.0 Copyright Information $o%yrig't ( 2020# Oracle and)or its a*liates. All rig'ts reser+ed. ,'is soft-are and related doc"mentation are %rovided "nder a license agreement containing restrictions on "se and disclosure and are %rotected by intellect"al %ro%ert& la-s. E.ce%t as e.%ressly %ermitted in &o"r license agreement or allo-ed by la-# &o" may not "se# co%&# re%rod"ce# translate# broadcast# modif&# license# transmit# distrib"te# e.'ibit# %erform# %"blish# or display any %art# in any form# or by any means. Re+erse engineering# disassembl&# or decom%ilation of t'is soft-are# "nless re/"ired by la- for intero%erabilit&# is %ro'ibited. ,'e information contained 'erein is sub0ect to change -it'o"t notice and is not -arranted to be error-free. If &o" find any errors, %lease re%ort t'em to "s in -riting. If t'is is soft-are or related documentation t'at is deli+ered to t'e .S. 2o+ernment or an&one licensing it on be'alf of t'e .S. 2o+ernment# t'en t'e follo-ing notice is a%%licable3 .S. 2O4ERN!EN, END SERS3 Oracle %rograms, incl"ding any o%erating s&stem# integrated soft-are# any %rograms installed on t'e 'ard-are# and)or documentation# deli+ered to .S.
    [Show full text]
  • Zenworks Mobile Workspace Migration Guide
    ZENworks Mobile Workspace Migration guide Version 3.18.4 - March 2019 Copyright © Micro Focus Software Inc. All rights reserved. Table of Contents Overview. 1 From ZENworks Mobile Workspace 3.X to ZENworks Mobile Workspace 3.18 . 1 Introduction . 1 Required . 1 Server applications . 1 Push configuration . 1 Optional . 1 Server applications . 1 Push configuration . 2 Unix . 2 Windows . 2 Log4j configuration . 2 For information . 3 Reply/forward HTML content. 3 From ZENworks Mobile Workspace 3.X to ZENworks Mobile Workspace 3.17 . 4 Introduction . 4 Required . 4 Server applications . 4 LDAP configuration . 4 Log4j configuration . 4 Optional . 4 Customer infrastructure . 4 From ZENworks Mobile Workspace 3.X to ZENworks Mobile Workspace 3.16 . 5 Introduction . 5 Required . 5 Server applications . 5 SSL/TLS certificates. 5 LDAP configuration . 5 Workspace camera feature. 6 New supported media extensions attachment. 6 Customer infrastructure . 6 From ZENworks Mobile Workspace 3.X to ZENworks Mobile Workspace 3.15 . 6 Introduction . 6 Optional . 7 Server applications . 7 Customer infrastructure . 7 Overview Usually, an update of the ZENworks Mobile Workspace application server to a newer version only requires to execute the installer tool. However, some manual operations may be necessary to ensure the proper functioning of the product. This guide describes the required steps to finalize the migration to the desired supported version. All instructions for versions between the previous version and the updated version need to be followed. From ZENworks Mobile Workspace 3.X to ZENworks Mobile Workspace 3.18 Introduction This version introduces the push configuration per application. Required Server applications Push configuration Since ZENworks Mobile Workspace 3.18.0, push is no longer configured globally on the server, but on a per-application basis directly from the administration console.
    [Show full text]
  • Open Source and Third Party Documentation
    Open Source and Third Party Documentation Verint.com Twitter.com/verint Facebook.com/verint Blog.verint.com Content Introduction.....................2 Licenses..........................3 Page 1 Open Source Attribution Certain components of this Software or software contained in this Product (collectively, "Software") may be covered by so-called "free or open source" software licenses ("Open Source Components"), which includes any software licenses approved as open source licenses by the Open Source Initiative or any similar licenses, including without limitation any license that, as a condition of distribution of the Open Source Components licensed, requires that the distributor make the Open Source Components available in source code format. A license in each Open Source Component is provided to you in accordance with the specific license terms specified in their respective license terms. EXCEPT WITH REGARD TO ANY WARRANTIES OR OTHER RIGHTS AND OBLIGATIONS EXPRESSLY PROVIDED DIRECTLY TO YOU FROM VERINT, ALL OPEN SOURCE COMPONENTS ARE PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. Any third party technology that may be appropriate or necessary for use with the Verint Product is licensed to you only for use with the Verint Product under the terms of the third party license agreement specified in the Documentation, the Software or as provided online at http://verint.com/thirdpartylicense. You may not take any action that would separate the third party technology from the Verint Product. Unless otherwise permitted under the terms of the third party license agreement, you agree to only use the third party technology in conjunction with the Verint Product.
    [Show full text]
  • Syncro SVN Client 8.1
    Syncro SVN Client 8.1 Notice Copyright All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and SyncRO Soft SRL, was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. Syncro SVN Client | Contents | 5 Contents Chapter 1: Introduction..........................................................................................11 Chapter 2: Installation............................................................................................13 Installation
    [Show full text]
  • Intro to Log4j 2.0.Key
    Introducing Log4j 2.0 History of Apache Log4j Early Java Logging • System.out and System.err • Originally, Java didn't have any form of logging other than abuse of the standard output and error PrintStream objects. • The shell running a Java application could simply redirect standard output and standard error to files. • It was common to include a sort of debug system property to enable or disable logging messages. • Many programmers still haven't upgraded from Logging 0.1. Example Code boolean debug = Boolean.getBoolean(“DEBUG”); ! if (debug) { System.out.println(“Low priority.”); System.err.println(“High priority.”); } ! catch (final Throwable t) { t.printStackTrace(); } The Original Log4j • Written by Ceki Gülcü • Provided a system of named Loggers that aided in categorising and filtering log messages. • Allowed for more than two levels of logging similar to Apache HTTPD Server and other custom logging systems. • Easily configurable using a Java properties file, XML file, or programmatically. • Provided various ways to output and save log messages. Example Code private static final Logger LOGGER = Logger.getLogger(“org.apache.Foo”); ! LOGGER.debug(“Low priority.”); LOGGER.info(“Next level up.”); LOGGER.warn(“High priority.”); LOGGER.error(“Higher priority.”); LOGGER.fatal(“Catastrophic priority.”); ! catch (final Throwable t) { LOGGER.error(“Caught exception.”, t); } Logback • Gülcü went on to create SLF4J and Logback • Provided parameterised log messages with placeholders. • Added markers for additional filterable message information.
    [Show full text]
  • Distributed UIMA Cluster Computing
    Distributed UIMA Cluster Computing Written and maintained by the Apache UIMATMDevelopment Community Version 1.0.0 i Copyright c 2012 The Apache Software Foundation Copyright c 2012 International Business Machines Corporation License and Disclaimer The ASF licenses this documentation to you under the Apache License, Version 2.0 (the "License"); you may not use this documentation except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, this documentation and its contents are distributed under the License on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Trademarks All terms mentioned in the text that are known to be trademarks or service marks have been appropriately capitalized. Use of such terms in this book should not be regarded as affecting the validity of the the trademark or service mark. Publication date: 14-01-2014 Table of Contents I DUCC Concepts1 1 DUCC Overview 2 1.1 What is DUCC?................................................2 1.2 DUCC Job Model...............................................2 1.3 DUCC From UIMA to Full Scale-out.....................................3 1.4 Error Management...............................................5 1.5 Cluster and Job Management.........................................6 1.6 Security Measures...............................................7 1.7 Security Issues.................................................7 2 Glossary 8 II Ducc Users Guide 10 3 Command Line Interface 11 3.1 The DUCC Job Descriptor.......................................... 11 3.2 Operating System Limit Support....................................... 12 3.3 Command Line Forms............................................
    [Show full text]
  • Version 3 User's Guide
    Apache UIMA™ Apache UIMA™ Development Community Version 3.2.0 UIMA 3 User's Guide Overview of UIMA Version 3 . 2 What’s new in UIMA 3 . 2 Java 8 is required . 5 Backwards Compatibility . 6 JCas and non-JCas APIs . 6 Additional reserved names in the JCas generated classes . 6 Serialization forms . 6 Delta CAS Version 2 Binary deserialization not supported . 6 APIs for creating and modifying Feature Structures. 7 Preserving V2 ids, with low level CAS Api accessibility . 7 PEAR support . 9 toString(). 9 Logging configuration is somewhat different. 9 Type System sharing . 10 Some checks moved to native Java . 10 Some class hierarchies have been modified . 11 Enabling multiple versions of type systems to work with a single common JCas class . 11 New and Extended APIs . 12 UIMA FSIndex and FSIterators improvements. 12 New Select API . 13 New custom Java objects in the CAS framework . 13 Built-in lists and arrays. 13 Built-in lists and arrays have common super classes / interfaces . 14 Many UIMA objects implement Stream or Collection . 14 Reorganized APIs . 14 Use of JCas Class to specify a UIMA type . 15 JCasGen changes. 15 JCas additional static fields . 15 Generics added . 15 Other changes . 15 SelectFS CAS data access. 17 Select’s use of the builder pattern . 17 Sources of Feature Structures . 18 Use of Type in selection of sources . 19 Sources and generic typing. 19 Selection and Ordering. 21 Boolean properties . 22 Configuration for any source . 22 Configuration for any index . 22 Configuration for sort-ordered indexes . 23 Following or Preceding . 24 Bounded sub-selection within an Annotation Index .
    [Show full text]