The problem with this is that the next time we run a build the latest
struts-config.xml is retrieved from source control.  I know I can create the
datasource manually on initialization, but I'm trying to let Struts handle
it somehow as you suggest.

- Arash

> -----Original Message-----
> From: Eddie Bush [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, April 29, 2002 12:24
> To: Struts Users Mailing List
> Subject: Re: datasources
> 
> 
> You could always comment one of them out, depending on which 
> environment you're running in, and save yourself having to do 
> anything else =)
> 
> ... I'm lazy though.
> 
> Just surround the definition you don't want initialized with:
> 
> <!--
>     You just made your datasource definition a comment.
>     Restart Tomcat =)
> -->
> 
> You'll have to look to another person to provide you a way to 
> initialize the datasource yourself if you don't like my 
> suggestion.  I tend to let Struts do whatever it can for me.
> 
> HTH,
> 
> Eddie
> 
> ----- Original Message -----
> From: "Ramin, Arash" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 29, 2002 9:55 AM
> Subject: datasources
> 
> 
> >
> > We have a couple datasources defined in our application (in
> > struts-config.xml) under separate keys (one is for our dev 
> > environment,
> and
> > the other for production).  The default behaviour for Struts is to 
> > initialize all the defined datasources and make them 
> available to the 
> > application.  Depending on which environment we're running in, only 
> > one of them should be initialized.
> >
> > Can I tell Struts not to initialize the datasources 
> automatically so I 
> > can do it manually in my own servlet?  I already have a constant 
> > defined in a resource file so my application can determine which 
> > datasource to use.
> Any
> > suggestions?
> >
> > (Struts 1.1 beta 1, Tomcat 4.03, Sun JDK 1.3.1)
> >
> > Thanks,
> >
> > Arash
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to