6 Replies Latest reply on Aug 30, 2007 2:58 AM by Mihai Anescu

    Can I define some "constants" in the components.xml?

    Mihai Anescu Newbie

      Hello,

      So, I would like to set some parameters that will be used to configure a module, like an email server, jms context, etc.

      The class that does the actual processing is not a Seam component, and further more, is being called from multiple Seam components. I know I could define the parameters for each Seam component, but I want to know if is a way I can define them globally (can this be done with "factory"?), and most important how do I retrieve the values inside a Seam component?

      Does this work?

      <factory name="providerUrl" value="localhost:1099"/>


      And is yes, how do you retrieve the value in a Seam component?
      Does this code work?

      @In
      private String providerUrl