ElementTree for Java
At last when I needed a small and easy to use XML parser (which DOM and JAXP aren't) I ported the famous Python's ElementTree API for XML parsing in a few hours. This work is far from complete but the parsing part is working. (to be done: writing, Xpath-like- and tree- traversing)
Download: elementtree.tar.gz
This work is based on XmlPull API. You will need (download separately) xmlpull_1_1_3*.jar and a parser implementation; I recommend XPP (the "min" variant is both small and fast).
Configuration items for Java/J2EE tools I collected over time
- General Eclipse settings for Java development
- Eclipse workspace settings
- basic log4j configuration
- how to setup a production Tomcat and small Tomcat 6 patches: system JRE detection, class loader refinement
- how to (basically) enable remote JMX in a JVM
- Some extensions for java.util.logging: binary, source and sample logging.properties (used for Tomcat)
- a JNDI viewer JSP page (requires JSTL 1.2): source
- a Unix (Bourne) shell script I use to repack Java software to a (much!) smaller size -- typically ⅓ : jarlist.sh, and the associated unpacker binary and source
- Ant resources for Java projects: this pack contains a master build file, build unit properties, and other extensions
- sample JAXB external binding file to specify per input-file target package, and similarly for JAXWS external binding; And associated converter class to avoid XmlGregorianCalendar.
- a micro JAXWS servlet to publish web services on JEE5 (or servlet+Java6 or servlet+Java5+JaxWS impl): source and binary. Includes a micro JSP-EL based template engine (because JSP pages cannot be embedded in a jar). This is upwardly compatible with, and takes advantage in advance of, JAX-WS 2.2 spi.http API.
Links from a training session
I have had a general J2EE survey which gave me some coverage on J2EE standards. However I'm still missing extended descriptions on timers, web services and JSF.
- http://java-source.net/
- http://javatoolbox.com/
- http://en.wikipedia.org/wiki/Comparison_of_application_servers#Java_EE
I am currently learning JavaEE 5.
I have already practiced [more or less] persistence (JPA), EJB (stateless session, message driven), servlets, JMS.
Now I'm rather interested in architectural aspects, relating to
- transactions,
- clustering,
- EJBs in general,
- timers,
- JCA ("connectors"),
- web-services,
- servlet finer details (such as filters, listeners),
- JSP and JSF.
I would like to see how some kind of Ajax + REST + MVC framework could be built around standardized technologies of the Java world.
Also, I would like to investigate whether EasyBeans is a suitable platform for production applications in the industry.
Until now it looks promising: embedded in Tomcat it starts in 3-4 seconds with Java6, compared to JBoss 30-50s startup it's much more comfortable for development.
However as always in Java world, documentation is quite poor, especially when time comes for configuration: I don't know yet how to...
- configure logging so that it follows other packages' logging format (especially Tomcat)
- plug a database connection which is not HSQL
- persist JMS messages in that database
- configure (JMS, JNDI, JPA, etc) for clustering
- get a decent [JMX] administration console (installing Jonas and it's Flex app isn't an option)
Some people around me said Sun's tutorial is a good way to get full coverage of this standard.
So I have started to read it.
Here is where I stopped reading: J2e5tutostate.txt
Here are some notes I took along: J2e5summary.txt
2009-07-21
Having found missing information about demonstration of many specification details, I have temporarily stopped reading this document.
At work I have searched for lightweight MVC + template web toolkits, without success. Since recent work in Python I know a template engine can be small enough for my requirements, and I now have good grasp on MVC designs, so I started to write this desired lightweight toolkit:
Here is the current state of sources: butterflyweb-src.zip
UPDATE! I have stopped this small development after discovering an existing framework with acceptable performance/weight ratio: Stripes. I was pointed to this during a training session and have since used it in a prototype with success.