incubator-imperius-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naidu G Javvadi <njavv...@in.ibm.com>
Subject Re: Is Java_SPLPolicyRuleProvider thread safe?
Date Sun, 29 Jun 2008 17:05:57 GMT
Hi
  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,
 Naidu
 System Software Engineer.

 IBM India pvt ltd
 India Software Lab, IBM Software Group
 Embassy Golf Links, 4th Floor, ‘B’ Wing, Bangalore
 Phone:+91-80-41055471
 e-mail:njavvadi@in.ibm.com


                                                                           
             "Reza Asadollahi"                                             
             <rasadoll@uwaterl                                             
             oo.ca>                                                     To 
                                       <imperius-user@incubator.apache.org 
             28/06/2008 01:25          >                                   
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
             imperius-user@inc         Is Java_SPLPolicyRuleProvider       
             ubator.apache.org         thread safe?                        
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi,

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.



Thanks,

Reza



Mime
View raw message