You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kenneth Love <kl...@tax.ok.gov> on 2006/09/12 23:59:19 UTC

[Axis 1.x] Determining Service Configuration Parameters

Hello,

I am trying to load several configuration parameters (e.g. directory
locations and log filename/location) that are needed by my service.
If I hard-code the values in my service implementation
(EfileServiceImpl.java) my function behaves as I would expect.  All
other attempts to move configuration parameters to a file have failed
with varying results (class not found, null pointer exception, etc.).

Here is an abbreviated version of my current implementation:

--------------------------------------------------------
package gov.ok.tax.efile;

// import statements removed

public class EFileServiceImpl implements EFileService
{
     // TODO These variables need to be dynamically loaded from a
     //      configuration/properties file instead of hard-coded.
     private static File baseDirectory = new File("c:/dev/EfileService");
     private static File logConfigurationFilename = new File(baseDirectory,
                 "config/efile_service_log4j.xml");

     // Additional initialization removed

     public SendResponseReceipt send(SendTransmission transmission)
             throws java.rmi.RemoteException
     {
         authenticate();

         // SendUtils class not supplied
         return SendUtils.send(transmission, xmlSendDirectory);
     }

     // Other WSDL functions/operations removed

     // authenticate function removed
}
--------------------------------------------------------


I need to be able to load these configuration parameters either when
Tomcat/Axis is started or when the service is called by the client.
I am not particularly biased towards either method.

The parameters need to be configurable on a service level as opposed
to a global Axis level.  On the other hand, if a global level is
required to make my service work, I'll use it.

What is the recommended way to dynamically load configuration
information for a service?

adTHANKSvance,
Kenneth Love


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kenneth Love                   |         Oklahoma Tax Commission
DP Programmer/Analyst          |         Information Technology
(405) 522 - 5864               |         http://www.tax.ok.gov/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org