Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Development Cycle

Re: Development Cycle

From: Brian Peasland <peasland_at_usgs.gov>
Date: Mon, 26 Feb 2001 14:03:24 GMT
Message-ID: <3A9A622C.89CE7058@usgs.gov>

One of the things that we do is put all of our connect information in a flat file on our server. Then the application reads the connect information from this "parameter file". You then have different parameter files depending on which server you may be running your code on. For example:

on my work server, I may have the following in my connect parameter file:

   ip_address: 123.456.789.012
   sid: orcl
   username: scott
   password: tiger
On my home server, I will have nearly identical information, but it may look like:

   ip_address: 456.789.012.345
   sid: orcl
   username: other_user
   password: his_pswd

Then in my code, I have something like this psuedo code:

   begin

     open my parameter file
     read ip_address into var_ip_address
     ...  (two nearly identical entries here)
     read password into var_password
     close my parameter file
 
     connect to database using (var_ip_address, var_sid,
                                var_username, var_password)
     begin processing

  end;

The code is the same no matter which machine you are on, it's just your parameter file (which defines your connection) is changed.

HTH,
Brian

Mazur wrote:
>
> How do you guys keep the SID's and ip addresses of your code straight
> during the development cycle?
>
> Let me explain....I have a project that I would like to work on at the
> office where there is a Oracle instance on a server. I write my code
> (servlets/JSP's) on my laptop connected to the Oracle server on the LAN.
>
> I also have an Oracle instance at home on a server, where I write my
> code on a desktop connected to the Oracle server on the LAN. It has the
> same SID name as the Oracle instance at work. Both work and home have
> active web servers online as well.
>
> When developing the code/web pages, I need to specify ip addresses for
> web links, a SID for the database, an ip address for the Oracle server
> to accompany the SID for the conneciton, etc. If I am writing this code
> at work, I can't very well take my java source files home to work on
> them, and expect them to work on the fly....as the ip addresses for the
> web servers are different, the ip addresses for the Oracle servers are
> different....luckily the SID's are the same.
>
> Do you see the dilemna? Of course, when I take the code home, I could
> change all the hardcoded ip addresses and web link addresses before I
> begin work again. But then I would have to change them back in the
> morning when I return to work....a bit of a pain.
>
> Is there some kind of cool scenario anyone uses to get around an issue
> like this? I mean, an answer would be "do all your development in one
> place." But....I would like to work at the office and at home on the
> same project.
>
> Any advice would be appreciated.
> Thank you,
> Rob Mazur
 

-- 
========================================
Brian Peasland
Raytheons Systems at
  USGS EROS Data Center
These opinions are my own and do not
necessarily reflect the opinions of my 
company!
========================================
Received on Mon Feb 26 2001 - 08:03:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US