It's getting even better. In case you're in a SAR, you have to do something 
like:


  | ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
  | if (classLoader instanceof UnifiedClassLoader) {
  |     UnifiedClassLoader unifiedClassLoader = (UnifiedClassLoader) 
classLoader;
  |     URL url = unifiedClassLoader.getURL();
  |     String path = url.getPath();
  |     if (path.matches(".*" + EAR_PREFIX + ".*\\.ear.*")) {
  |             String fullEARPrefix = path.substring(path.indexOf(EAR_PREFIX), 
path
  |                             .indexOf(".ear"));
  |             return fullEARPrefix;
  |     }
  | }
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922283#3922283

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922283


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to