This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Question regarding JCA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Question regarding JCA" Watch "Question regarding JCA" New topic

Question regarding JCA

P Lavti
Ranch Hand

Joined: Mar 27, 2007
Posts: 65
Hi Everybody,

My Requirement:
1. remove the usage of cleartext password from mysql-ds.xml
2. Use the custom password manager to retrieve the password

Given Solution by extend the SecureIdentityLoginModule:
JBoss connector API�s provides SecureIdentityLoginModule to encrypt database passwords rather than using clear text passwords in the datasource configuration. I have extended this class and overridden the commit method, which will call password manager to retrieve the password.

By going thru the custom login module, JBoss JCA takes ~25 milliseconds to return the connection. And this 25 milliseconds doesn't count the time to call password manager. But if I don't use cleartext password, it takes hardly 1 millisecond.

I want to understand:
1. what is done by JCA when login module is used which takes !25 milliseconds.
2. Is there any way I can configure JBoss JCA to verify the password only for the 1st time, and for the subsequent calls, it just returns the connection in ~1 milliseconds.

Thanks in advance,

-P Lavti<br />SCJP 5.0 (88%)
Peter Johnson

Joined: May 14, 2008
Posts: 5812

Did you set min-pool-size in the *-ds.xml file? If not, try setting it to the number of simultaneous connections that you expect to have and see if that reduces the time.

JBoss In Action
I agree. Here's the link:
subject: Question regarding JCA
Similar Threads
JAAS in Websphere
Plugin for Decrypting Data Source Passwords in Jboss
Swing client communication...
java thin client login in Websphere
Deploying EJB using MySql as a datasource