Showing posts from September, 2007

Jetty XmlConfiguration

Mort Bay Consulting Jetty XmlConfiguration. O'Reill article Kudos to the Jetty team for taking the XML configuration one step farther: ... all Jetty-specific calls ... are element or attribute values, not names. This means the XML configuration can be used with any classes, even non-Jetty classes. Depending on how your app is written, you could configure it all through Jetty's XML config. See the references below for more details. Jetty configuration example Other Jetty configuration examples Jetty configure.dtd Jetty XmlConfiguration Jetty Java Xref try { final XmlConfiguration xconfig = new XmlConfiguration(<configUrl>); xconfig.configure(<object ref>); } catch (IOException ioe) { ... } catch (SAXException saxe) { ... } catch (Exception e) { ... } <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure 1.1//EN" "ht




Josh Bloch Generics JavaOne 2006 Builder pattern / Static Factories klass.cast(...) Sparse Array Serialization Proxy Use private and final unless reason not Generics Considered Harmful Generics vs. Autocasting Explicitly provide type by passing in class, see bottom of page method generics public abstract void getAndParse(T paramAnotherClass); public void addFriend(String name, Class type, T animal);  

Concept links

TDD - wikipedia OO terms - wikipedia Cohesion Inversion-of-Control, Dependency Injection, Service Locator - Fowler Service Locator not a pattern J2EE ServiceLocator best practice Open Closed Principle Liskov Substitution Principle