Saturday, 28 September 2013

How apex get executed in Salesforce

How apex get executed in Salesforce

i write a Batch apex.i write an execute method .which is using a static
variable of another class.because it is shhared.any one can use it and
change it.
public void execute(Database.BatchableContext BC, List<sObject> scope){
x=GMirror.x;
...........
...........
.........
y =GMirror.x;
}
i want to know each batch of 5 in my case will run in transaction or means
at this time only this method is running nothing else or in other words i
want to know if using another class's method execution in between time
first statement execute x=GMirror.x;
and second statement y =GMirror.x;
its possible by another parallel execution of another class's method that
these value of GMirror.x get changed ?? these execution this necessary
that no one changed value of GMirror.x or value of GMirror.x can be
changed by another parallel execution.Please clarify .

No comments:

Post a Comment