Re: creating a second database connection
Re: creating a second database connection
- Subject: Re: creating a second database connection
- From: Theodore Petrosky <email@hidden>
- Date: Fri, 24 Aug 2012 05:32:56 -0700 (PDT)
It's not just spelling. i don't know why John responded. just below the sample property listing I listed the different spellings that I tried and .URL is number two. I was in the process of writing back to John when I thought, "do it again".
OK, so why does it work today? Maybe because I got a good night's sleep (lots of meds helped) or it's Friday, or I am off today, or i get to reglaze windows. :-)
BTW, that question was rhetorical no one needs to try to explain why it is working today.
Anyway, thanks all again.
Ted
--- On Thu, 8/23/12, Chuck Hill <email@hidden> wrote:
> From: Chuck Hill <email@hidden>
> Subject: Re: creating a second database connection
> To: "John Huss" <email@hidden>
> Cc: "Theodore Petrosky" <email@hidden>, "WebObjects Development" <email@hidden>
> Date: Thursday, August 23, 2012, 11:15 PM
>
> I hate it when spelling counts.
>
>
> On 2012-08-23, at 8:03 PM, John Huss wrote:
>
> > Not .DBURL, just .URL
> >
> > On Thu, Aug 23, 2012 at 8:12 PM, Theodore Petrosky
> <email@hidden>
> wrote:
> > ojdbc14.jar is in /Library/Java/Extensions
> >
> > it is also in the framework itself.
> >
> > interesting after experimenting I find I can use the
> properties file for:
> >
> > #
> SPAccessModel.DBURL=jdbc:oracle:thin:@10.1.3.250:1521/XE
> > #
> SPAccessModel.DBPlugin=com.webobjects.jdbcadaptor.OraclePlugIn
> > # SPAccessModel.DBDriver=oracle.jdbc.OracleDriver
> > SPAccessModel.DBUser=user
> > SPAccessModel.DBPassword=pw
> >
> > I have tried:
> >
> > SPAccessModel.DBURL
> > SPAccessModel.URL
> > SPAccessModel.DBUrl
> >
> > but until I comment it out and copy the connection
> string into the eomodel file, it does not connect.
> >
> > from the docs:
> >
> > To do this for Oracle you can either specify on a per
> model basis or on a global basis.
> >
> > Global:
> > dbConnectServerGLOBAL =
> myDatabaseServer
> > dbConnectUserGLOBAL =
> me
> > dbConnectPasswordGLOBAL
> = secret
> > dbConnectPluginGLOBAL =
> Oracle
> > Per Model for say model ER:
> > ER.DBServer =
> myDatabaseServer
> > ER.DBUser = me
> > ER.DBPassword = secret
> > ER.DBPlugin = Oracle
> >
> > Openbase: same, with DBDatabase and DBHostname
> >
> > JDBC: same with dbConnectURLGLOBAL, or ER.DBURL
> >
> > i am going home for the night. maybe tomorrow i will
> see the error.
> >
> > Ted
> >
> > --- On Thu, 8/23/12, email@hidden
> <email@hidden>
> wrote:
> >
> > > From: email@hidden
> <email@hidden>
> > > Subject: Re: creating a second database
> connection
> > > To: "Theodore Petrosky" <email@hidden>
> > > Cc: "Tim Worman" <email@hidden>,
> "WebObjects Development" <email@hidden>
> > > Date: Thursday, August 23, 2012, 8:56 PM
> > > Do you have the JDBC driver for
> > > Oracle in the class path?
> > >
> > > Envoyé de mon iPhone
> > >
> > > Le 2012-08-23 à 20:24, "Theodore Petrosky" <email@hidden>
> > > a écrit :
> > >
> > > > Tim,
> > >
> > > >
> > > > This is almost perfect. I used this example
> and 'fixed'
> > > the postgresql framework to work correctly with
> the
> > > properties file.
> > > >
> > > > now the oracle property is giving grief. this
> is what I
> > > have:
> > > >
> > > > # Connection Dictionary
> > > >
> > >
> SPAccessModel.URL=jdbc:oracle:thin:@10.1.3.250:1521/XE?capitalizeTypenames=true&zeroDateTimeBehavior=convertToNull
> > > > SPAccessModel.DBPlugin=OraclePlugIn
> > > > SPAccessModel.DBDriver=com.oracle.Driver
> > > > SPAccessModel.DBUser=user
> > > > SPAccessModel.DBPassword=pw
> > > >
> > > > I must not have the correct name for the
> plugin and
> > > Driver.
> > > >
> > > >
> > > >
> > > > --- On Thu, 8/23/12, Tim Worman <email@hidden>
> > > wrote:
> > > >
> > > >> From: Tim Worman <email@hidden>
> > > >> Subject: Re: creating a second database
> connection
> > > >> To: "Theodore Petrosky" <email@hidden>
> > > >> Cc: "Chuck Hill" <email@hidden>,
> > > "WebObjects Development" <email@hidden>
> > > >> Date: Thursday, August 23, 2012, 7:51 PM
> > > >> I have connection settings for all of
> > > >> my databases in properties. They all
> work. When a
> > > Wonder app
> > > >> starts, it logs out all properties being
> used by
> > > the
> > > >> application. You won't even need to try
> and use the
> > > app - if
> > > >> they aren't there, they weren't
> discovered. If your
> > > app is a
> > > >> Wonder app, ERXConfiguationManager will
> discover
> > > all the
> > > >> properties.
> > > >>
> > > >> At launch, if your props are being
> improperly
> > > overwritten
> > > >> then you need to do a file search in your
> project
> > > for where
> > > >> they are being overridden. You cannot use
> any
> > > global
> > > >> settings if you are using more than one
> database
> > > since
> > > >> globals will be applied to every db
> connection.
> > > >>
> > > >> your individual database properties will
> be named
> > > as such:
> > > >>
> > > >> MyModel.URL =
> jdbc:urlForDatabaseConnection
> > > >> MyModel.DBDriver =
> com.openbase.jdbc.ObDriver
> > > (whatever)
> > > >> MyModel.DBPlugin = OpenBasePlugIn
> (whatever)
> > > >> MyModel.DBUser = user
> > > >> MyModel.DBPassword = password
> > > >>
> > > >> Where your EOModel is named
> "MyModel.eomodeld." It
> > > will work
> > > >> if you're not accidentally overriding
> the
> > > properties
> > > >> elsewhere.
> > > >>
> > > >> T
> > > >>
> > > >
> _______________________________________________
> > > > Do not post admin requests to the list. They
> will be
> > > ignored.
> > > > Webobjects-dev mailing list
> (email@hidden)
> > > > Help/Unsubscribe/Update your Subscription:
> > > >
> > > > This email sent to email@hidden
> > >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
> --
> Chuck Hill
> Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase
> their overall knowledge of WebObjects or who are trying to
> solve specific problems.
> http://www.global-village.net/gvc/practical_webobjects
>
>
>
>
>
>
>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden