You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/06/15 06:20:30 UTC

cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/webservices/finance/stockmarket JetspeedStockQuoteService.java

taylor      2004/06/14 21:20:30

  Modified:    src/java/org/apache/jetspeed/webservices/finance/stockmarket
                        JetspeedStockQuoteService.java
  Log:
  made the SOAP endpoint configurable
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.8       +17 -2     jakarta-jetspeed/src/java/org/apache/jetspeed/webservices/finance/stockmarket/JetspeedStockQuoteService.java
  
  Index: JetspeedStockQuoteService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/webservices/finance/stockmarket/JetspeedStockQuoteService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JetspeedStockQuoteService.java	23 Feb 2004 03:15:29 -0000	1.7
  +++ JetspeedStockQuoteService.java	15 Jun 2004 04:20:30 -0000	1.8
  @@ -25,10 +25,17 @@
   import java.net.URL;
   import java.net.HttpURLConnection;
   import java.rmi.RemoteException;
  +
  +import javax.servlet.ServletConfig;
  +
   import org.xml.sax.helpers.XMLFilterImpl;
   import org.xml.sax.InputSource;
   
  +import org.apache.jetspeed.services.profiler.ProfilerService;
  +import org.apache.turbine.services.InitializationException;
   import org.apache.turbine.services.TurbineBaseService;
  +import org.apache.turbine.services.TurbineServices;
  +import org.apache.turbine.services.resources.ResourceService;
   
   /**
       Implements StockQuoteService,
  @@ -74,7 +81,6 @@
       private static final String FULL_QUOTES_RESULT = "fullQuotesResult";
       private static final String DEFAULT_RETURN = "return";
   
  -
       /**
           Get a single stock quote, given a symbol return the current price.
   
  @@ -383,4 +389,13 @@
            }
        }
   
  +    public synchronized void init(ServletConfig conf) throws InitializationException
  +    {
  +        ResourceService serviceConf = ((TurbineServices)TurbineServices.getInstance())
  +            .getResources(StockQuoteService.SERVICE_NAME);
  +
  +        soapEndPoint = serviceConf.getString( "endpoint", SERVICE_END_POINT);
  +        
  +    }
  +    
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org