Am Montag 16 November 2009 schrieb Guillaume Nodet: > On Mon, Nov 16, 2009 at 22:45, Oliver Lietz <[email protected]> wrote: > > Am Montag 16 November 2009 schrieb Guillaume Nodet: > > > > Thanks, Guillaume. > > > >> Yes, the blueprint specification only allow interfaces and use proxies > >> underneath, so you can't access the real class. The geronimo > >> blueprint implementation has a feature similar to spring-dm where you > >> can have proxies for classes (using cglib) instead of just interfaces. > > > > How can I use this feature? Where is it documented? > > It's not really documented. > You can activate it by using the custom namespace: > > <blueprint > xmlns:ext="http://geronimo.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" > .... > > > <reference ... ext:proxy-method="classes"> > ... > </reference> > > </blueprint> > > You can also use this flag on the <reference-list> element. > > >> But still you won't be able to access the exact instance that has > >> been registered in the OSGi registry. > > > > Does a cast or a call to instanceof work? I'm trying to figure out the > > most elegant way to inject a set of views in to an application's user > > interface. The views inherit from javafx.scene.CustomNode and it works > > when I use a wrapper. But I want to get rid off these wrappers of course. > > I suppose it should work, as cglib create a derived class underneath.
no luck: Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: com.example.api.ModuleView$$EnhancerByCGLIB$$17150a4b cannot be cast to javafx.scene.Node --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

