Author |
Message
|
pcelari |
Posted: Fri Aug 27, 2010 6:47 am Post subject: possible to alter Data source property of a compute node? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Hi,
I wonder if it is possible to alter the Data source property of the Compute node at run time.
I need to access different database depending upon the message content.
This seems to be a simple task, hopefully it is.
any insight would be appreciated.
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Aug 27, 2010 6:55 am Post subject: Re: possible to alter Data source property of a compute node |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
pcelari wrote: |
Hi,
I wonder if it is possible to alter the Data source property of the Compute node at run time.
I need to access different database depending upon the message content.
This seems to be a simple task, hopefully it is.
any insight would be appreciated.
 |
you have to use different kind of design pattern then...
keep the DSN's in DB, fetch it depends upon the content and use it
hope this will help you  _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
pcelari |
Posted: Fri Aug 27, 2010 7:03 am Post subject: Re: possible to alter Data source property of a compute node |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
Gaya3 wrote: |
keep the DSN's in DB, fetch it depends upon the content and use it
|
would you articulate a little more on this? it there an example somewhere in the document?
thanks a lot.
 _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Aug 27, 2010 7:16 am Post subject: Re: possible to alter Data source property of a compute node |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
pcelari wrote: |
[quote=Gaya3]keep the DSN's in DB, fetch it depends upon the content and use it
|
would you articulate a little more on this? it there an example somewhere in the document?
thanks a lot.
[/quote]
you will not get design pattern documented in any where. but probably you may get this idea in [url]eaipatterns.com[/url]
say you are sending a data which is required to be inserted to different kind of DBs depends upon the content.
if the content is Emp insert to EMPDB and the DSN = EMPDB
if the content is Sal insert it SALDB and the DSN = SALDB
in this case what you can think of is :
keep a property table where it keep this pattern and keep the data like
Category, Value
DSN.EMP EMPDB
DSN.SAL SALDB
and from your code you fetch the pattern and its value:
This is just an algorithm logic or and eg code
for eg
if(content.value = "EMP")
{
dsnValue = fetchDSN(DSN.EMP)
connectToEMPDB("Do what ever your operations");
}
esle check for the other content and proceed
Hope you got what i am trying to convey  _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 27, 2010 7:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
|