Multiple Datasources / Application architecture question.

6 views
Skip to first unread message

Gavin Baumanis

unread,
Sep 11, 2010, 9:41:13 PM9/11/10
to galaxy-dev
I am now using in anger our login service for one of our clients and
it is working really well for us.

The sample app (within this google group) is pretty unchanged from
what we're actually using - ust in case you wanted to have a look...

Although I now have an architecture issue.
For want of a better word - our "real" CFC that extends galaxy
contains a method for query a database to authenticate the user
credentials passed to the webservice.

The local invocatin of the "real" CFC sets a datasource to use.

Now I want to extend the use of the login service to our other clients
and here in lies our problem.
Each client has it's own database and datasource.

The issue seems to be that the very first login request for datasource
"A" works fine and dandy.

If I attempt to login against Site B, then we set the datasource (once
again in the app specific CFC) to site B - however, subsequent
requests ALWAYS use datasource A - the datasource used when the object
was initially instantiated.

I tested by removing te WSDl from the CF Admin, clearing the CFC /
Template caches and restarted the CF server.
I then logged in (successfully) to site "B".
Retried logging in using client "A"s version of our application and
subsequently the login failed.
I could use a customer "B" account to login "A".

So it would seem my guestmate of what is hapening is accurate.

The big question is of course - is there way to overwrite the
datasource per request - to match the appropriate database to use -
post initial object creation?

Or do I now need to create a separate service per datasource - which
would work... but ends up causing other issues (use of threads etc)

Thanks
Gavin.
Reply all
Reply to author
Forward
0 new messages