Skip to content

Commit

Permalink
[WFLY-4345] Use a lazy reference if the component view service is not UP
Browse files Browse the repository at this point in the history
For application clients, the view services are not actually started.
Using a lazy reference instead will ensure that the EJBs can properly
injected into the application.

JIRA: https://issues.jboss.org/browse/WFLY-4345
  • Loading branch information
jmesnil committed Feb 16, 2015
1 parent cb488b2 commit 373f9ce
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ private ResourceReferenceFactory<Object> handleServiceLookup(ViewDescription vie
}

private ComponentView getComponentView(ViewDescription viewDescription) {
final ServiceController<?> controller = serviceRegistry.getRequiredService(viewDescription.getServiceName());
final ServiceController<?> controller = serviceRegistry.getService(viewDescription.getServiceName());
if (controller == null) {
return null;
}
return (ComponentView) controller.getValue();
}

Expand Down

0 comments on commit 373f9ce

Please sign in to comment.