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:[EMAIL PROTECTED]
"Reza Asadollahi"
<[EMAIL PROTECTED]
oo.ca> To
<[email protected]
28/06/2008 01:25 >
cc
Please respond to Subject
[EMAIL PROTECTED] 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
