incubator-imperius-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naidu G Javvadi <>
Subject Re: Is Java_SPLPolicyRuleProvider thread safe?
Date Sun, 29 Jun 2008 17:05:57 GMT
  Java_SPLPolicyRuleProvider is not thread safe.Yes, it is good practice to
have only one instance of it rather than having multiple objects(which can
result to performance related problems).We can have synchronized block for
its methods such that they can be thread safe.

 Thanks & Regards,
 System Software Engineer.

 IBM India pvt ltd
 India Software Lab, IBM Software Group
 Embassy Golf Links, 4th Floor, ‘B’ Wing, Bangalore

             "Reza Asadollahi"                                             
   >                                                     To 
             28/06/2008 01:25          >                                   
             Please respond to                                     Subject 
             imperius-user@inc         Is Java_SPLPolicyRuleProvider       
            thread safe?                        


Is the instance of Java_SPLPolicyRuleProvider thread safe? I mean, if we
have only one instance of this class, can we use it safely in different
threads for creating or executing policies?

Is it a good practice to have only one instance? or it's better to have
several instances in a multi-threaded program (one per thread), or having
one instance in the program and use synchronize block for its method calls.



View raw message