Hi Bill, Steve and John,

Domain Scope Variables by definition are assigned to the Domain the
Variables are assigned/used in during execution. Domain Scope is not
dependant on any other Scope, such as User.

The StartupURL can only take one address, therefore can only assign one set
of Domain variables.

If your Server hosts multiple Domains, this won't work unless you use <@URL>
and call each Domain separately in your Startup TAF, something like:

<@URL LOCATION="http://www.mydomain.com/default.taf";>
<@URL LOCATION="http://www.mysite.com/default.taf";>
<@URL LOCATION="http://mysite.com/default.taf";>

Note that http://www.mysite.com and http://mysite.com are actually
considered separate domains as far as Witango is concerned, even though they
both point at the same set of files. And Domain Scope variables are not
accessible by a TAF executed under a different Domain name.

So myfile.taf executed under http://www.mysite.com cannot read the Domain
Scope Variables assigned earlier by myfile.taf under http://mysite.com -
even though it might be the "same" TAF file.

-----
I would suggest investigating Custom Scope. Custom Scope is similar to
Domain, with the added bonus that these Variables are accessible from all
Domains on the same Server. 

Which means http://www.mysite.com and http://mysite.com can both
share/access the same Variables. Under Domain Scope these two sites would be
looking at two different copies that may or may not be in sync with each
other, and you have twice as much memory eaten up by these Variables.

Also, under Custom Scope you can initialize your Variables in one Startup
TAF without <@URL> by simply inserting the Scope name in the assignment.
Something like:

<@ASSIGN mydomain$Common value="blah, blah...">
<@ASSIGN mysite$Common value="blah, blah...">

Note: The Scope name can be dynamically inserted, so you could get them from
a database and loop through and make your assignments dynamic. Something
like:

<@ROWS ARRAY=local$mydomains_toassign>
 <@ASSIGN NAME=Common SCOPE="<@VAR local$domainIDs[<@CURROW>,name]>"
VALUE="<@VAR local$common_vars_<@VAR local$domainIDs[<@CURROW>,name]>>">
</@ROWS>

I do a similar thing with my stuff, where one set of TAF files service
multiple Domains at a time. I just assign a "domain ID" to each User
(because User Scope is also limited by Domain). So a User can dynamically
call a custom Scope variable like so:

<@VAR name=Common SCOPE="<@VAR user$domainID>">

Custom Scope names are just names that don't match an existing Scope name.
So you can call the Scopes Fred, Betty, Microsoft, free_beer - anything you
want, but you obviously can't call them Local, User, Method, Instance,
System, Domain, Application or Request.

No additional configuration is required to use Custom Scope.

Hope this helps. Cheers....

Scott Cadillac,
Witango.org - http://witango.org
403-281-6090 - [EMAIL PROTECTED]
--
Information for the Witango Developer Community
---------------------

XML-Extranet - http://xml-extra.net
403-281-6090 - [EMAIL PROTECTED]
--
Well-formed Development (for hire)
---------------------


> -----Original Message-----
> From: Bill Conlon [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 19, 2003 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Witango-Talk: Domain Variables
> 
> 
> It's a system scope variable initialized in witango.ini.  See 
> Configuration Variables.
> 
> You might maintain a system table containing domains to be 
> initialized at 
> app server startup, along with the applicaable initialization 
> taf file.
> 
> >Interesting. That might be a better approach. A user could 
> be viewing pages
> >other than default.taf. I haven't used or heard of 
> StartupURL. Can you point
> >me to documentation about this.
> >
> >Can this be domain specific?
> >
> >This still may have the problems that John Hotaling talks 
> about. Maybe I
> >should automatically read the database and not check a 
> SystemInitialized
> >variable and use your method?
> >
> >Steve
> >
> >-----Original Message-----
> >From: Bill Conlon [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 19, 2003 12:06 PM
> >To: [EMAIL PROTECTED]
> >Subject: Re: Witango-Talk: Domain Variables
> >
> >
> >I haven't used domain variables yet, but this looks like it 
> could be an 
> >interesting thread.
> >
> >You mention that on running default.taf for the first time, 
> it checks 
> >whether domain$common is empty.  What if the service 
> restarts while a 
> >user session is in process.  Would a user request still trigger this 
> >check?
> >
> >What about setting StartupURL to InitializeSystemVariables, and not 
> >depending on user state?
> >
> >>Win2K sp3 server, R:Tango 2000, R:Base 6.5
> >>
> >>I'll try to explain this as best I can. I am having trouble 
> with my domain
> >>variables. When I restart Witango services or it restarts 
> itself, my domain
> >>variables are reset to old values, not the current ones. 
> The current values
> >>are stored in a database table. Are domain variables stored 
> in a cache that
> >>reloads if the service restarts?
> >>
> >>This is how my application works. FYI: I have patterned it 
> after James
> >>Carroll's Storefront.
> >>
> >>Every time a visitor hits the home page, Default.taf, it 
> checks to see if
> >>the Object Instance Variable <@VAR domain$Common> for 
> catalog.tcf is empty.
> >>If it is, it calls catalog.tcf. The On_Create method calls 
> the method
> >within
> >>itself called InitializeSystemVariables. This method checks a domain
> >>variable <@VAR Domain$Initialized> to see if it is empty. 
> If it is empty,
> >it
> >>reads the database table and resets the variables.
> >>
> >>I can manually reset the variables with a method in 
> catalog.tcf called
> >>ReloadSystemVariables which reads a database table of these 
> variables and
> >>sets them up as domain variables. When I run that method, the domain
> >>variables are reset to the current variables in the table.
> >>
> >>I assume when the service restarts, that is clears all 
> domain variables. In
> >>particular Domain$Initialized, so when the first visitor 
> hits Default.taf,
> >>the application would reset the variables from the current 
> values in the
> >>table.
> >>
> >>Any help would be appreciated.
> >>
> >>Steve Fogelson
> >>Internet Commerce Solutions
> >>____________________________________________________________
> ____________
> >>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> >>
> >
> >
> >Bill Conlon
> >
> >To the Point
> >345 California Avenue Suite 2
> >Palo Alto, CA 94306
> >
> >office: 650.327.2175
> >fax:    650.329.8335
> >mobile: 650.906.9929
> >e-mail: mailto:[EMAIL PROTECTED]
> >web:    http://www.tothept.com
> >
> >
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> >_____________________________________________________________
> ___________
> >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> >
> 
> 
> Bill Conlon
> 
> To the Point
> 345 California Avenue Suite 2
> Palo Alto, CA 94306
> 
> office: 650.327.2175
> fax:    650.329.8335
> mobile: 650.906.9929
> e-mail: mailto:[EMAIL PROTECTED]
> web:    http://www.tothept.com
> 
> 
> ______________________________________________________________
> __________
> TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
> 

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

Reply via email to