class Foo {

static boolean isInitialized = false;

  public Foo(...) {
    if (Foo.isInitialized) {
      .. do init stuff as below ..
    }
    ....
  }

}

...or am I missing something?

Tom

Marco Spinetti wrote:
Hi I need to read some configuration parameter, so reading some mails in
mail list I have written:

MessageContext msgContext = MessageContext.getContext();
    SOAPService    service    = msgContext.getService();
    paramValue         = service.getOption("paramName");

and I have inserted <parameter ..../> to my service.

I have discovered that you can't insert this code in a static block, (http://marc.theaimsgroup.com/?t=104765761500001&r=1&w=2)

so I try to insert it in the constructor of my class with my SOAP method.

But I see that the constructor is called every invocation of my web service, so could
someone explain me how to initialize a variable one time and only one time?

Cheers

--Marco









Reply via email to