google-code-export / mvp4g

Automatically exported from code.google.com/p/mvp4g
1 stars 0 forks source link

java Play framework #102

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
anyone got mvp4g to work with java Play framework? I have been trying for 3 
weeks, no luck.

Original issue reported on code.google.com by bhom...@gmail.com on 3 Nov 2011 at 11:36

GoogleCodeExporter commented 9 years ago
I've never tried Java play framework. What kind of issue do you have? Maybe 
someone on the Mvp4g group can help you.

Original comment by plcoir...@gmail.com on 4 Nov 2011 at 1:53

GoogleCodeExporter commented 9 years ago
TypeOracleMediator can not resolve the presenter and view classes when they are 
referenced by the annotator.

Original comment by bhom...@gmail.com on 4 Nov 2011 at 4:51

GoogleCodeExporter commented 9 years ago
I'm not familiar with this framework. It seems to be a back-end framework. How 
does it integrate with GWT? Could you post some code? That may help to 
understand your issue.

Thanks.

Original comment by plcoir...@gmail.com on 4 Nov 2011 at 2:46

GoogleCodeExporter commented 9 years ago
It has to do with TypeOracleMediator's use of Thread based ContextClassLoader.

Let's try this wo getting into Play too much. Play has the ability to 
incorporate different modules. One of these modules contributed by an author is 
the gwt module. I tested out two projects, with and wo the use of Play. 

case 1, wo Play, the code processes right thru and found presenter and
views represented using mvp4g annotation. the relevant code in gwt2.4
is TypeOracleMediator line 750, inside resolveAnnotationValue() method

      try {
          return Class.forName(valueType.getClassName(), false,
              Thread.currentThread().getContextClassLoader());
        } catch (ClassNotFoundException e) {
          logger.log(TreeLogger.ERROR, "Annotation error: cannot
resolve "
              + valueType.getClassName(), e);
          return null;
        }

so, wo Play framework, this call resolves a presenter or view class
and returns a good value.

case 2. same code with Play framework, the call ends with
ClassNotFoundException and returns null.

I checked in both cases, the thread is a daemon thread tie to the
browser request. Why should there be such a difference? anyone has an
idea how to proceed? 

Original comment by bhom...@gmail.com on 4 Nov 2011 at 5:26

GoogleCodeExporter commented 9 years ago
I can not see what mvp4g can do to solve the issue. Please provide more 
informations. Otherwise I will close the issue. 

Original comment by frank.hossfeld on 26 Nov 2014 at 3:02