John -- 

We have a need that is similar to yours.  In our situation, we're changing the schema 
attribute as we move from one level to another, or, more frequently, from one 
development environment to another.

To simplify this, we define an alias in our repository.xml file:

<!DOCTYPE descriptor-repository SYSTEM "repository.dtd" [
<!ENTITY schema        "dev1">
]>

Then, in our class mapping file, we refer to the entity.

<class-descriptor class="xxx.Customer" schema="&schema;" table="CUSTOMER">

HTH

Ron Gallagher
Atlanta, GA
[EMAIL PROTECTED]

> 
> From: "McCaffrey, John G." <[EMAIL PROTECTED]>
> Date: 2003/06/25 Wed PM 04:49:35 EDT
> To: 'OJB Users List' <[EMAIL PROTECTED]>
> Subject: RE: moving between environments (test, stage, prod)
> 
> That wasn't very clear...
> What I mean is, as I move the app from on environment to another, how can I
> configure OJB to use a different database, without having to create a copy
> of the repository_user.xml, for each database (and only changing the one
> line from 'test' to 'prod' for each class).
> 
> If that is the solution (multiple xml files), how do I feed a different xml
> file to OJB.
> 
> In short, how are other people managing OJB properties file changes when
> moving from a Test server to a Production server?
> 
> hope that makes more sense.
> -john
> 
> -----Original Message-----
> From: McCaffrey, John G. 
> Sent: Wednesday, June 25, 2003 3:35 PM
> To: 'OJB Users List'
> Subject: moving between environments (test, stage, prod)
> 
> 
> Sorry for the newbie question.
> How do I tell OJB to Change the prefix of the database?
> 
> I am currently working in the 'test' database, so in repository_user.xml my
> class descriptor has the table prefixed with test like this:
> <class-descriptor class="com.kraft.esi.msf.common.db.dsna.BpCntctVO"
> table="test.bp_cntct">
> 
> How do I tell it to change to "stage" or "Prod"?
> 
> 
> I thought that it was in the  jdbc-connection-descriptor dbAlias, but that
> didn't work.
>  
>               <jdbc-connection-descriptor
>                       jcd-alias="default" 
>                       default-connection="true"
>                       platform="Db2"
>                       jdbc-level="2.0"
>                       jndi-datasource-name="jdbc/MasterFilesDB2"
>                       dbalias="test"
>                       eager-release="false"
>                       batch-mode="false"
>                       useAutoCommit="0"
>                       ignoreAutoCommitExceptions="true"
>               >
> 
> Thanks for you help, 
> -John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to