Hi fanyun,
 
Thanks for the response. Upon further review, I think my issue is simply a limitation of the sample Login mechanism, rather than a limitation of the turbine framework. Ie I should be able to create multiple named database pools, and reference the appropriate one depending upon context, from a single turbine servlet. Haven't looked into the webmacro stuff, so can't help there.
 
Dave
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of fanyun
Sent: Saturday, August 12, 2000 11:25 PM
To: Turbine
Subject: Re: database pool scope

I have met this problem also. For me, I want two WebSite use different WebMacro settings.  But I also find only one Turbine take effect. It should not be a configuration error.
 
 
Regards
 
fanyun
 
 
----- Original Message -----
Sent: Sunday, August 13, 2000 12:51 AM
Subject: database pool scope

Hello,
 
I am new to this list, so sorry if this has been asked before. I am wondering if turbine can be used in the following fashion. Say I've got a couple of web servers:
 
 
On an app server, I've got jakarta with my turbine webapp. The trick is, then when a request comes from www.foo.com, I want my turbine webapp (such as the login screen) to talk to database 'dbfoo'. When a request comes into www.foo.com, I want my webapp to talk to database 'dbbar'.
 
In a possibly misguided attempt to prototype this, I configured turbine as pretty much as describe in 'install.txt'. A added a second servlet specification named 'Turbine2' as listed below. I also created a second turbine properties file named 'Turbine2.properties'. When my URI referenced 'Turbine', the framework uses TurbineResources.properties, and when it referenced Turbine2, then the framework uses TurbineResources2.properties. I changed the welcome message in each property file, and verified that each servlet alias properly loaded the appropriate properties file. My next step was to set the database.default.url to the appropriate database for each properties file.
 
What I found was that when I referenced 'Turbine' in my first browser instance, then turbine will connect to the database from TurbineResources.properties as expected. However, when my second browser instance referenced 'Turbine2', then the database accessed would be for 'Turbine', not 'Turbine2'.  The when I referenced 'Turbine2 first, the opposite occurred. So, a 'singleton' connection pool seems to have been created that is used by both Turbine and Turbine2.
 
Is this architecture doable with turbine, or is my configuration just wrong?
 
Thanks in advance,
Dave
 
 
---
<servlet>
    <servlet-name>Turbine</servlet-name>
    <servlet-class>Turbine</servlet-class>
    <init-param>
        <param-name>properties</param-name>
        <param-value>../../conf/TurbineResources.properties</param-value>
    </init-param>
</servlet>
 
<servlet>
    <servlet-name>Turbine2</servlet-name>
    <servlet-class>Turbine</servlet-class>
    <init-param>
        <param-name>properties</param-name>
        <param-value>../../conf/TurbineResources2.properties</param-value>
    </init-param>
</servlet>
---

Reply via email to