Author |
Message
|
w |
Posted: Wed Feb 02, 2011 4:48 am Post subject: CacheConfig node issue |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
I have two flows deployed in an execeution group.One flow has a CacheConfig node that loads a property file into cache .The recache time is 5 secs.From the second flow I read these values using CacheReplay node.Now if i change the property file that change is not reflected in the CacheReplay node .
Do I need to trigger the first flow(containing CacheConfig Node) every time there is a change in Property file for the change to be reflected?
[using WMB 6.1]
 |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Feb 02, 2011 4:52 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
w |
Posted: Wed Feb 02, 2011 4:53 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
Thank you. but what is Singleton anyways? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Feb 02, 2011 4:55 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Feb 02, 2011 5:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
While a Singleton is an excellent pattern to use, in either Java or in ESQL using a SHARED ROW, it doesn't actually resolve your particular issue.
It would move you off of using the Cache supportPack, however, which my esteemed secret agent colleague has had trouble with in the past.
So you have to evaluate his bad experience against your own desire to write your own code here.
To answer the question you've actually asked - Yes, you have to invoke the flow with the CacheConfig node every time the properties file has changed. It doesn't, as far as I know, monitor this file at all.
And even if it did, that would mean that it was holding onto the flow instance that started it - or that it had spun off a second thread that might be difficult to close down later (as it was outside of Broker's awareness).
You might look at keeping the data in a database, instead of in a file and maybe using DatabaseInput to react to changes. If you're at a level of broker that supports DatabaseInput, that is. |
|
Back to top |
|
 |
w |
Posted: Wed Feb 02, 2011 7:09 am Post subject: |
|
|
Apprentice
Joined: 08 Nov 2010 Posts: 44
|
@ mqjeff
I did some debugging and have found out that i do not really need to execeute the flow every time.(and yes u r abosolutely right it is very difficult to close.U need to restart the broker).The problem i am facing is becoz of the inability of the CacheConfig node to Publish the recached data .
Can u plz tell me what to set in Real time port under the properties of CacheConfig node under Real time tab.
Thank you. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Feb 02, 2011 7:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You only need to set the RealTime port if the cache is going to be shared between multiple brokers.
If you are trying to share the cache between multiple brokers, you need to set the RealTime port to the same value you had set on the RealTime PubSub node you had deployed to an EG somewhere.
There's documentation on this in the Cache supportPac documents. |
|
Back to top |
|
 |
|