users@glassfish.java.net

GF Bug? Getting empty credentials in JCA Adapter

From: <forums_at_java.net>
Date: Thu, 22 Dec 2011 14:20:05 -0600 (CST)

I've created a JCA adapter. I'm receiving blank credentials howerver in my
getConnection method in my ManagedConnection class. What's strange is this
works in WebSphere (never thought I'd encounter _that_ scenario).  
In the Glassfish Console, I have a connector work map defined: [quote]
Principals: * Backend Principal: Username: backendUser Password: topSecret
[/quote]   Here's my getConnection method: [code] public Object
getConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws
ResourceException { String operatorId = null; String operatorPassword = null;
  for (PasswordCredential cred :
subject.getPrivateCredentials(PasswordCredential.class)) { operatorId =
cred.getUserName(); operatorPassword = new String(cred.getPassword());   if
(operatorId != null && operatorPassword != null) { break; } } ..... [/code]
  If I put a breakpoint, operatorId is always "" and operatorPassword is
null. What's going on?
 


--
[Message sent by forum member 'exabrial']
View Post: http://forums.java.net/node/876829