[jboss-user] Problem multiples wars in Jboss Portal 2.2.1

Eros eroscc at terra.com.br
Mon Oct 30 06:58:31 EST 2006


I have a problem with multiples wars. 
My JboosPortal version is: 2.2.1RC3 

My classes are shared, but my jboss-web.xml is: 

<class-loading java2ClassLoadingCompliance="false">
    </loader- repository-config> 

I see the problem when I try load one .properties that it is inside of war. 
Each war it has a different file .properties, with equals name but with 
different content. 

In my class that load .properties this code is used: 

public class CommonInformationPortal implements ServletContextListener {
 private static Properties properties = null;

 public static void load()
   if(properties == null)
    properties = new Properties();
  catch(Exception e)
 public static String getProperty(String property)  {
                                      return properties.getProperty(property);
  catch(Exception e)
   return null;

But always return the ClassLoader of last deployed war. 
So the file .properties read is always the file of last deployed war. 

I try use ServletContextListener the load of file .properties is ok, but when I get any propertie of this file is returned propertie of last deployed war. 

How i can resolve this problem?
In 2.4 or 2.6 version of portal this problem was resolved?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20061030/d9d2d4a7/attachment.html 

More information about the jboss-user mailing list