On Fri, Apr 24, 2009 at 7:55 PM, Guus Bloemsma <[email protected]> wrote:
> It would be really great if Qi4J could be used together with GWT.
Right now, I have no particular opinion whether this is a good idea or not.
> As far as
> I can see the big showstopper here is the use of CGLIB and dynamic proxies.
> As for CGLIB I couldn't really find out where it is used (I just read about
> it in another thread).
CGLib is currently only used for a single case; When you only
implement an interface partially in Concern/SideEffect/Mixin, you do
so with;
public abstract class SomeMixin
implements Some
{
public void doWhatEver()
{
}
}
The JVM don't like partially implemented classes, and doesn't allow
you to instantiate an abstract class, although we can guarantee that
those other methods will never be called. Therefor, Qi4j Runtime will
create a subclass from such class, where the missing methods exist and
do nothing.
> For the dynamic proxies however I was thinking of the following:
> Run the application locally in hosted mode where dynamic proxies should work
> without problems. Have some patch in place that records for which classes
> dynamic proxies are being created.
> Next generate source equivalent to those dynamic proxies (maybe in a GWT
> generator) to replace them.
Sounds doable with clever instrumentation, or perhaps only running an
inspection of the Model and have the inspection tool generate the
classes. Also a different Qi4j Runtime would be needed which doesn't
use the dynamic proxies approach.
> I don't have enough insight into Qi4J to say anything about the feasibility
> of this. Any comments?
It is not a trivial undertaking, but definitely within reach of a
dedicated community member or two. I don't think it makes sense to
spread the current resources even thinner on this at this point in
time.
I am also interested to hear why you feel this is such a good idea,
compared to only providing simple integration of GWT apps to a Qi4j
backend.
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/2qq9er
I work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev