vt-password: PasswordValidator can be shared across multiple threads
33 views
Skip to first unread message
Otávio Garcia
unread,
Jan 3, 2014, 11:54:31 PM1/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vt-middle...@googlegroups.com
Can I share a PasswordValidator instance across multiple threds in my webapplication using CDI?
I have a class like this:
public class PasswordStrength {
@Produces @ApplicationScoped public PasswordValidator getValidatorInstance() { [...] } }
So CDI will create only one instance per application instance and share across various requests. PasswordValidator can be used as this without concurrency issues?
Daniel Fisher
unread,
Jan 6, 2014, 2:06:16 PM1/6/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vt-middle...@googlegroups.com
Yes, you can share a single instance of PasswordValidator across multiple threads as long as all your Rules are thread safe.