Community

JcaXAResourceRecovery

reply from Jesper Pedersen in JCA Development - View the full discussion

Anil, I'm currently looking into the best way to hook up a username/password pair to the component to get a Subject.

 

Basically I have added recover-user-name and recover-password elements to the xa-datasource definition to allow users to specify a special user name and password for the recovery if that is needed. Default is fallback to the standard user-name and password pair.

 

Also included is a recover-security-domain, just like the security-domain - and same concept as above.

 

I have injected the

 

org.jboss.security.SubjectFactory

 

instance into the component (org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment).

 

So I'm looking for the simplest solution for the following method:

 

 

private Subject getSubject()

 

 

At the moment I have:

 

private Subject getSubject()
{
   if (subjectFactory != null && recoverSecurityDomain != null)
   {
      return subjectFactory.createSubject(recoverSecurityDomain);
   }
 
   return null;
}

 

to cover for the recover-security-domain case.

 

I would like to keep this change inside the component in order to make the minimal changes possible to other components that doesn't need to know about this feature.

Reply to this message by going to Community

Start a new discussion in JCA Development at Community