Archive for June, 2009
Tip: Debugging JAXP Internals
In my latest battle with JAXP and Schema validation, I found out a little trick. It turns out, that implementation classes in JAXP use a debug flag to control stdout debugging. And this little flag is initialized from the system property jaxp.debug
So, starting your program, application server, … with -Djaxp.debug=true enables all sorts of initialization/bootstrap [...]
June 25, 2009
Tags: jaxp, xml Posted in: Programming
No Comments
JAXP Schema Validation in Java5 and Java6
I have had a little battle with schema validation of XML documents and thought I would share it with the world.
I wrote the below code on Java5, thinking this was a way of validating a piece of XML against a schema definition. And indeed, it does work on Java5:
SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setSchema(sf.newSchema(schemaUrl));
DocumentBuilder [...]
June 25, 2009
Tags: jaxp, schema, validation, xml Posted in: Programming
One Comment
How To Acess Target Object Behind a Spring Proxy
When annotating spring managed beans with stuff like @Transactional, spring will behind the scenes produce code, that ensures that transaction logic is applied before and after your code. Depending on the configuration, this is often done using a JDK proxy, which is a dynamically generated class implementing the bean interfaces. This dynamically generated code will [...]
June 5, 2009
Tags: Java, spring Posted in: Programming
6 Comments
