Sat, 30 May 2009

10:02 PM - Apache Cayenne

 I've been working on converting just journal over to Apache Cayenne today.  I figured it would give me an opportunity to get better with it.  Cayenne has a nice modeling program, but their documentation is often lacking.

For example, suppose you're getting an error from your servlet container (Tomcat in my case) about a filter not loading.  With Cayenne, the "correct" way to use it is to load a filter mapped to /* that catches all the sessions and maps a DataContext to them.  You might find after pulling your hair out that there is a syntax error in your DomainNode.driver.xml file.  Even with logging cranked up in log4j, it will not tell you what's wrong with the filter.  However, if you initialize like a traditional app in a jsp page, you can see the error.  Invalid passwords are an example of what can cause this.

 

tags: cayenne java apache

0 comments