This content has been marked as final.
Show 2 replies
-
1. Re: Access EJB from different WAR in JBoss AS via injection
robby.cornelissen May 13, 2013 10:23 PM (in response to charlie7)I got it to work using the following approach:
# Define EJBs as resources using the @Produces annotation: {code}
public class Resources {
@Produces
@EJB(lookup = "java:global/.../WhateverService")
private WhateverService whateverService;
}
{code}
# 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.
-
2. Re: Access EJB from different WAR in JBoss AS via injection
charlie7 May 14, 2013 6:28 AM (in response to robby.cornelissen)That worked . Thansk for helping out