Robby Cornelissen [
https://community.jboss.org/people/robby.cornelissen] created the
discussion
"Re: Access EJB from different WAR in JBoss AS via injection"
To view the discussion, visit:
https://community.jboss.org/message/817508#817508
--------------------------------------------------------------
I got it to work using the following approach:
1. 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.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/817508#817508]
Start a new discussion in EJB3 at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]