2 Replies Latest reply on Apr 26, 2006 4:40 PM by JAYAKUMAR

    XML Parsing from Stateless bean

    JAYAKUMAR Newbie

      Hi,

      I need to parse some configuration information from XML files and have them used in the Session beans.

      1. Is there any place where we can store the configuration information?
      2. Since this read-only information is needed for the entire application, at what point should we trigger loading it?

        • 1. Re: XML Parsing from Stateless bean
          Mark Lybarger Apprentice

          i'd recommend looking at the jndibinding-service.xml in the jboss deploy folder. i'm told you can bundle this as part of an ear to isolate things to a particular application, but haven't really tried that much.

          in the slsb, i'd get all values from jndi during the setSessionContext method, and cache them. some old adage that jndi lookups are slow.

          if you really want to package some xml file with your ejb, just know you can't change the configuration easily w/o repackaging and redeploying your bean.

          • 2. Re: XML Parsing from Stateless bean
            JAYAKUMAR Newbie

            Thanks for the response. I resolved this by using MBeans. I loaded the configuration information during boot-strap and I am able access it from SLSB.