Author |
Message
|
Cubersome |
Posted: Tue Oct 09, 2012 8:21 am Post subject: SYNCPOINT in WMB |
|
|
Apprentice
Joined: 02 Mar 2012 Posts: 37
|
Hi,
I have to incorporate the CICS SYNPOINT logic in WMB..means only one process can execute particular code and other process should wait...
It would be great if you can provide any pointers on how to do that in ESQL?
Thanks... |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 09, 2012 8:24 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Your question is hard to understand.
You can't execute CICS code from ESQL.
So maybe you are asking about using BEGIN ATOMIC. |
|
Back to top |
|
 |
Cubersome |
Posted: Tue Oct 09, 2012 8:59 am Post subject: |
|
|
Apprentice
Joined: 02 Mar 2012 Posts: 37
|
Thanks a lot Jeff....
I hope it answers my question..I will give it a try..
In CICS..we can write some code and to perform synchornization we will use EXEC SYNCPOINT END EXEC so that other transactions cannot access that code at the same point of time. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 09, 2012 9:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Cubersome wrote: |
Thanks a lot Jeff....
I hope it answers my question..I will give it a try..
In CICS..we can write some code and to perform synchornization we will use EXEC SYNCPOINT END EXEC so that other transactions cannot access that code at the same point of time. |
Okay. again, you're merely asking how to do the same kind of thing in ESQL, you are not trying to run CICS code inside ESQL?
If that is the case, then the BEGIN ATOMIC block is what you are looking for.
But it's only needed in those situations where you are explicitly accessing resources that are known to be shared across instances of a single message flow.
ESQL Code is generally not reentrant and generally threadsafe and generally only accesses logical message tree data which is confined to a given message flow instance (thread). |
|
Back to top |
|
 |
Cubersome |
Posted: Tue Oct 09, 2012 9:51 am Post subject: |
|
|
Apprentice
Joined: 02 Mar 2012 Posts: 37
|
I am not trying to run CICS code in ESQL..
But it's only needed in those situations where you are explicitly accessing resources that are known to be shared across instances of a single message flow. ---- I am trying to access the same code through different message flows/Webservices etc. Will BEGIN ATOMIC serves this purpose?? |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 09, 2012 10:03 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am trying to access the same code through different message flows/Webservices etc. Will BEGIN ATOMIC serves this purpose?? |
@Cubersome: If I may say so, that information would have greatly enhanced your first post. I'm just sayin'. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 09, 2012 10:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
BEGIN ATOMIC says that only one thread at a time can execute the code contained within the block.
It is regardless still likely not necessary. Even if you deploy your ESQL file as a standalone esql file in Broker v8, it will still be threadsafe and not reentrant unless you are accessing other kinds of shared resources.
Now, it's possible someone will correct me on that, but I believe it is true.
If you are not at v8, then all ESQL code is compiled inline into the message flow regardless of whether it is packaged in separate esql files or separate msgflow projects. So every message flow has it's own copy of the code, which runs in it's own threadspace and etc. etc. etc.
So again, still threadsafe and not reentrant. |
|
Back to top |
|
 |
|