[jboss-user] [EJB3] - Re: Access EJB from different WAR in JBoss AS via injection

Robby Cornelissen do-not-reply at jboss.com
Mon May 13 22:21:18 EDT 2013

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 {
          @EJB(lookup = "java:global/.../WhateverService")
          private WhateverService whateverService;

# Inject the EJB resources in your bean using the @Inject annotation: {code}// ...

private WhateverService whateverService;

// ...

Works like a charm. I'm also using a similar CDI view scope approach.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130513/8a61389a/attachment-0001.html 

More information about the jboss-user mailing list