jsf - why does mojarra 2.1 scan every other war on each module startup? -


We have a huge EAR application with about 20 EJB-Jars and war modules.

The Mozierra module for each battle begins, it seems that it is trying to scan the comment on every other war. Other warfare is unavailable for classloader, so I'm getting a lot of exception. It eventually starts in any way, but it hides my logs with warnings, and I think that the application startup time can be very short without this time (+100 seconds).

To clear it, I am following the structure:

  EAR + - ejb1 + - ejb2 + - war1 + -. War2   

When Mojarra war1 starts, it complains about missing classes from war2 (ClassNotFoundException)

When I saw this 3.1 (and thus, Mojarra 2.1 ) Upgrades of glassfish.

Text after "div class =" itemprop = "text">

I found the cause and some solution.

On Glassfish 3.1, which is ship with Moserra 2.1, Classpath scanning has been handed over to the glassfish. Now, instead of the glassfish war, the ears attach to all sections of the file. . I think that was opened for (but this is actually a Glassfish bug, not getting JSF / Mojarra)

While waiting for a fix, I Mojarra compromised this way: com.sun. Java in faces.config.ConfigManager, around line 834, I commented out some lines:

  // if! DelegatingAnnotationProvider & example instance provider; & amp; //null = annotationScanner ) {// // This InjectionProvider is capable of annotation scanning * and * // // (DelegatingAnnotationProvider provider) .setAnnotationScanner (Annotation Scanner, // metadataGetter.getJarNames ()); // scanUris = Collections.emptySet (); //} else {// This injection provider is capable of scanning annotation only scanUris = metadataGetter.getAnnotationScanURIs (); //}   

Logs are now very few verbose, it seems that the glassfish is still scanning every section, so I still get such warnings:

  [# | 2011-03-18T13: 47: 05.019 + 0100 | Warning | Oracle-Glass Fish 3.1 | Javax.enterprise.system.container.web.org.glassfish.web.loader | _ThreadID = 57; _ThreadName = Thread-1; | WEB9052: Unable to load class org.apache.myfaces.custom.inputTextHelp.HtmlTextHelpRenderer, Reason: Java .lang.ClassNotFoundException: org.apache.myfaces.custom.inputTextHelp.HtmlTextHelpRenderer | #]   

But there is no stacktrace from Mojarra, which is already very few verbose.

Comments