Download presentation
Presentation is loading. Please wait.
Published byIsaac McKenzie Modified over 8 years ago
1
Java Tools for FB4John Paul Ashenfelter Leveraging Java Tools for Fusebox 4 Development John Paul Ashenfelter CTO/Transitionpoint ashenfelterj@transitionpoint.com
2
Java Tools for FB4John Paul Ashenfelter Why Use Java with CFMX? CFMX is Java… it’s just hidden and easier to use plus the JVM can’t tell the difference Many companies already use Java Java does some things CFMX can’t low-level libraries (e.g. network, graphics) though the gap is getting smaller
3
Java Tools for FB4John Paul Ashenfelter Where Can I Use Java Design Development Testing Deployment Maintenance Anywhere in the software lifecycle
4
Java Tools for FB4John Paul Ashenfelter Open Source and Java Lots of open source Java code lots of developers lots of choices lots of dead projects Many licenses GPL Apache
5
Java Tools for FB4John Paul Ashenfelter Ant
6
Java Tools for FB4John Paul Ashenfelter What’s Ant? a general-purpose build tool like make, but “better” XML-based tasks many defined extensible with Java can create complex dependencies
7
Java Tools for FB4John Paul Ashenfelter Getting Started with Ant targets order tasks can depend on other targets basic tasks echo mkdir, copy, delete properties ${x} can load from external file can pass on command line
8
Java Tools for FB4John Paul Ashenfelter A Little More nat filesets SCC integration
9
Java Tools for FB4John Paul Ashenfelter Walkthrough of Ant File
10
Java Tools for FB4John Paul Ashenfelter Fusebox 4 Ant Techniques filter expansion xml rewriting generating parsed files
11
Java Tools for FB4John Paul Ashenfelter More on Ant http://ant.apache.org http://sys- con.com/story/?storyid=43787 Java Development with Ant by Hatcher and Loughran (Manning, 2003)
12
Java Tools for FB4John Paul Ashenfelter Logging
13
Java Tools for FB4John Paul Ashenfelter Why not use CFMX? CFLOG default log directory only limited configuration flexibility CFFILE MODE=APPEND performance concerns can only write to filesystem log4cf (from DRK4) only filesystem and email capability
14
Java Tools for FB4John Paul Ashenfelter Jakarta Commons reusable Java components TM many subprojects very well-tested and vetted
15
Java Tools for FB4John Paul Ashenfelter Jakarta Commons-Logging (JCL) generic wrapper for loggers can choose several loggers log4j is the standard CFMX uses log4j for CFTRACE though an older version (1.1.3) which requires a little bit of workaround
16
Java Tools for FB4John Paul Ashenfelter Logging with JCL need a LogFactory use to get a Log (some.name.here) multiple levels INFO, DEBUG, FATAL, WARN, etc can use appenders for output files: files, rolling files, external rolling files email, JDBC, JMS, LF5 (Swing), socket custom! maybe jabber? other ideas?
17
Java Tools for FB4John Paul Ashenfelter A logging plugin for Fusebox 4 configurator = CreateObject("java", "org.apache.log4j.xml.DOMConfigurato r"); configurator.configure(configFile); application.logFactory = CreateObject("java", "org.apache.commons.logging.LogFact ory"); configLog=application.logFactory.getLo g("#application.applicationname#"); if (configLog.isDebugEnabled()) configLog.debug("configuring log for #application.applicationname#"); log=“"#application.applicationname#.#myF usebox.originalCircuit#.#myFusebox.origin alFuseaction#“”; thisLog=application.logFactory.getLog(log) ; if (thisLog.isInfoEnabled()) thisLog.info(msg);
18
Java Tools for FB4John Paul Ashenfelter XML Configuration
19
Java Tools for FB4John Paul Ashenfelter Logging Output 2004-08-05 01:37:18,187 INFO - fb4demo.controller.default [controller.default -- preFuseaction] 2004-08-05 01:37:18,187 INFO - fb4demo.controller.default [dev.wireframe -- preFuseaction] 2004-08-05 01:37:18,203 INFO - fb4demo.controller.default [layout.dev -- preFuseaction] 2004-08-05 01:37:18,203 INFO - fb4demo.controller.default [layout.basic -- preFuseaction]
20
Java Tools for FB4John Paul Ashenfelter More on Log4J http://logging.apache.org/log4j/docs/index.html http://www.sys- con.com/coldfusion/article.cfm?id=700
21
Java Tools for FB4John Paul Ashenfelter Other Java OSS Thoughts Lucene James POI Eclipse Subversion xUnit Jabber JasperReports
22
Java Tools for FB4John Paul Ashenfelter For more information… jakarta.apache.org sourceforge.net FullAsAGoog blog aggregator
23
Java Tools for FB4John Paul Ashenfelter Thanks! http://www.transitionpoint.com ashenfelterj@transitionpoint.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.