I got it to work using the following approach:
Define EJBs as resources using the @Produces annotation:
public class Resources {
@Produces
@EJB(lookup = "java:global/.../WhateverService")
private WhateverService whateverService;
}
# Inject the EJB resources in your bean using the @Inject annotation: {code}// ...
@Inject
private WhateverService whateverService;
// ...
{code}
Works like a charm. I'm also using a similar CDI view scope approach.