use of org.jboss.as.ee.component.BasicComponentInstance in project wildfly by wildfly.
the class WSComponentInstanceAssociationInterceptor method processInvocation.
@Override
public Object processInvocation(final InterceptorContext interceptorContext) throws Exception {
final WSComponent wsComponent = (WSComponent) interceptorContext.getPrivateData(Component.class);
BasicComponentInstance pojoComponentInstance = null;
if (interceptorContext.getPrivateData(ManagedReference.class) != null) {
ManagedReference reference = interceptorContext.getPrivateData(ManagedReference.class);
pojoComponentInstance = (BasicComponentInstance) wsComponent.createInstance(reference.getInstance());
} else {
pojoComponentInstance = wsComponent.getComponentInstance();
}
interceptorContext.putPrivateData(ComponentInstance.class, pojoComponentInstance);
return interceptorContext.proceed();
}
Aggregations