0 Replies Latest reply on Mar 7, 2016 3:13 PM by vp889x

    Static variable gives different values on how its accessed in jboss 6.4

    vp889x

      we have an application with EJB's , servlet's  and a class with static variables during the deployment time from DB via servlet init --> ejb -->DAO

      We are using Jboss 6.4 

       

      Application1.ear

        -  module1_ejb.jar (contains Global.java where static variables are defined)

        - module2_ejb.jar

        -web1.war

       

      Application2.ear

        -web2.war

      module dependencies to module1_ejb.jar and module2_ejb.jar

       

       

      one of the JSP's from Application2 makes an EJB call to Application1  and at run time based on one of the static variable  values the flow goes on ....

       

      From the logs it looks like the static variables are correctly initialized when Application1.ear is deployed ..

       

      The deployment order is Application1.ear  and later Application2.ear  ..

       

       

      It looks like there are multiple class loader loading the Global.java ... Not sure how to fix to use a single class loader

       

      Please add your comments .. not sure how to go about it ...

      Appreciate all the help ... Thanks in advance..