We have an Ant task that creates a properties.jar file with one file in it (a 
properties file) and copies the created JAR to the deploy folder.  The deploy folder 
is listed in the jboss-service.xml file as a valid URL within the URLDeploymentScanner 
MBean.  When the JBoss system is started, everything works just fine.  We read the 
property values from our properties file using the following method in our 
PropertyManager class:


  |     public static String valueForPropertyFromDomainWithLocale(String aProperty, 
String aDomain, Locale aLocale) {
  |         try {
  |             ResourceBundle properties = ResourceBundle.getBundle(aDomain, aLocale);
  |             for (Enumeration enum = properties.getKeys();enum.hasMoreElements();) {
  |                 String propertyKey = (String)enum.nextElement();
  |                 if (propertyKey.equals(aProperty)) {
  |                     return (String)properties.getObject(aProperty);
  |                 }
  |             }
  |         }
  |         catch (MissingResourceException e) {
  |             LogFactory.getLog("PropertyManager").warn("Unable to locate property 
file named "+aDomain+".", e);
  |         }
  |         return null;
  |     }
  | 

We would like to change the values of the attributes in the properties file and then 
run the Ant task to rebuild and redeploy the properties JAR while the server is 
running.  When I attempt to rebuild and redeploy the JAR on my staging server 
everything works just fine.  The PropertyManager class returns the new values for our 
properties.  However, when I try to hot deploy the properties JAR on a server with any 
amount of active sessions it doesn't work.  Could it be that ResourceBundle is not the 
correct approach to loading the modified property file?


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

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


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to