@PicketLink does not work
wuhuaxu Jan 4, 2016 7:17 AMI'm using picketlink subsystem in wildfly 9. I can get partitionmanager from the subsystem. I write a producer to produce the partitionmanager:
@ApplicationScoped
public class PicketLinkConfiguration {
@Resource(lookup="java:/picketlink/JPADSBasedPartitionManager")
private PartitionManager partitionManager;
@PicketLink
@Produces
public PartitionManager producePartitionManager() {
return partitionManager;
}
}
but picketlink does not use my partitionManager。
In picketlink's IdentityManagementProducer:
@Inject
public void init() {
if (this.partitionManager != null) {
throw new RuntimeException("Identity Management Subsystem already initialized.");
}
if (ROOT_LOGGER.isDebugEnabled()) {
ROOT_LOGGER.debugf("Initializing Identity Management Subsystem.");
}
if (!this.partitionManagerInstance.isUnsatisfied()) {
this.partitionManager = this.partitionManagerInstance.get();
if (ROOT_LOGGER.isDebugEnabled()) {
ROOT_LOGGER.debugf("PartitionManager provided by the application.");
}
} else {
// It comes here
this.partitionManager = createEmbeddedPartitionManager();
}
}
I open the ROOT_LOGGER, and i found it goes to the else part!
what i forget?
in addition. here is my deployment descriptor:
<jboss-deployment-structure> <deployment> <dependencies> <module name="org.hibernate.search.orm" services="export" /> <module name="org.picketlink.core.api" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm.api" meta-inf="import" annotations="true"></module> <module name="org.picketlink.core" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm" meta-inf="import" annotations="true"></module> <module name="org.picketlink.common" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm.schema" meta-inf="import" annotations="true"></module> </dependencies> </deployment> <sub-deployment name="irtx-identity-rest.war"> <dependencies> <module name="deployment.irtx-validation-ear-1.0.ear" /> <module name="org.hibernate.search.orm" services="export" /> <module name="org.picketlink.core.api" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm.api" meta-inf="import" annotations="true"></module> <module name="org.picketlink.core" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm" meta-inf="import" annotations="true"></module> <module name="org.picketlink.common" meta-inf="import" annotations="true"></module> <module name="org.picketlink.idm.schema" meta-inf="import" annotations="true"></module> </dependencies> </sub-deployment> <sub-deployment name="irtx-identity-jpa-impl.jar"> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> </sub-deployment> </jboss-deployment-structure>