Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Fix Version/s: 1.4.2
-
Component/s: None
-
Labels:None
-
Environment:Asp.net 1.1, MS Sql, windows2003
-
Number of attachments :
Description
Problem with NEO Framework
-------------------------
Previous Scenario
I have three sites running on different virtual directory
Say for eg -
Site1 running on A virtual directory
Site2 running on B virtual directory
Site3 running on C virtual directory
All sites are having a same code infect it is an asp model
Using the neo framework implement and running perfectly
Assigning key values of system/site for a particular user using
NEO Framework's Application variable and identify that users with that key values and all is working well.
Current scenario
Now as the code is same for all sites I have merge the above three sites i.e. site1, site2, site3.Previouly system/site will get Connection string from web.config file but from now as I have pointed the all the three sites's to single virtual directory say at "D" I have made this parameter database driven and store them in new admin database.
So new admin database have collection of user with the associated site and also site specific information like connection string, currency setting etc.
So the http://www.domainname.com/index.asp will be the login page and collect user and authenticate against "admin" database where only user and site level information is stored.
Say for eg "user1" user logs in and he is belongs to site1 and will redirected to
http://www.domainname.com/D/default.aspx by using connection string of the database with who (site) logged in user belongs to. And display the data accordingly works fine.
Storing database connection string and user level information to neo key value entity object, once user logged in.
Now what happens is new user say "user2" from site2 comes and try to logs in and get success. So once he logged in connection string and user level information stored in neo entity object.
Now the problem is data which is displaying to "abc" is from site2 and not from site1.
And now say "user3" from site3 logged in - "user1" and "user2" will see the data of site3 and not their own
Is there any solution to my problem? As I want to maintain a single copy of the same code for all sites.
(I m able to maintain single copy once I implement the concept of creating multiple virtual directory as I did previous but the only difference is with single code now it is possible.)
This is not a Neo bug and not a feature request. Neo is perfectly capable of accessing multiple databases from a single process. In fact, they can even take part in a single transaction. All that is required is to use multiple independent object contexts with datastores for the respective databases.
There is a planned feature described here http://docs.codehaus.org/display/NEO/Using+multiple+data+sources that would allow the use of multiple databases within one object context.