cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek Ĺ abo <ms...@buk.cvut.cz>
Subject Re: 3.1 example app & extended types
Date Tue, 13 Sep 2011 13:39:49 GMT
Oj I see, so I'm probably not gonna use @Inject anywhere?

I managed to upgrade configure from 3.0 to 3.1 but I don't know how to 
add extended types. I used to do it in wicket init method (wicket filter 
is second in web.xml, both are mapped to /*) but now I got nullpointer 
when I do this:

         ServerRuntime sr = (ServerRuntime) 
WebUtil.getCayenneRuntime(getServletContext());
         DataDomain domain = sr.getDataDomain(); <-- NPE
         DataNode node = domain.getNode("mainNode");
         node.getAdapter().getExtendedTypes().registerType(new 
Inet4AddressType());

Any ideas where I should finish my configuration? I thought WebUtil will 
provide instace of CayenneRuntime after CayenneFilter was handled.

Thanks,

Marek

Mime
View raw message