private static String getEarName() {
  |   URL url = Thread.currentThread().getContextClassLoader().getResource("");
  |   Pattern p = Pattern.compile("(?i)/([^\\\\/:\\*\\?<>\\|]+)\\.ear/");
  |   Matcher m = p.matcher(url.getPath());
  |   if (m.find()) {
  |     return m.group(1) + "/";
  |   } else {
  |     return "";
  |   }
  | }
It's a bit of a hack, but it's the only way I could find.

I don't want to be annotating every single bean, it's error-prone. Wish they 
would standardize bean naming.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159371
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to