// supports virtual filesystem used by JBoss 5.x
      try
      {
        URLConnection connection = url.openConnection();
        Object virtualFile = invokerGetter(connection, "getContent");
        Object zipEntryHandler = invokerGetter(virtualFile, "getHandler");
        URL realUrl = (URL)invokerGetter(zipEntryHandler, "getRealURL");
        if (realUrl.toString().indexOf(".war") !=-1 &&
realUrl.toString().indexOf(".jar") != -1) {
          //EAP 5.0.1 breaks getRealURL, concatenate what it's supposed to
do manually
          Object localPath = invokerGetter(zipEntryHandler,
"getLocalPathName");
          Object zipEntryContext = invokerGetter(zipEntryHandler,
"getZipEntryContext");
          URL jarRealUrl = (URL)invokerGetter(zipEntryContext,
"getRealURL");
          realUrl = new URL(jarRealUrl.toExternalForm() + localPath);
        }
        log.trace("Converted - " + url + " - to - " + realUrl);
        return realUrl;
      }

My jars are in WEB-INF/lib. Oddly enough EAP 5.0.x is supposed to match
jboss 5.1, yet somehow 5.0.0 and 5.0.1 are different. Maybe it depends on
what version of jboss 5.1 a particular person has.

There oughta be a module for this... I know the main reason for all this
reflection is not wanting a ton of jboss dependencies in my pom.
-- 
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Tapestry-5-JBoss-6-Silently-Fails-tp6021772p6032112.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to