JBoss Community

Accessing a deployed EJB from a war in the same AS 7 instance

created by Lucas Holmquist in EJB3 - View the full discussion

I'm sort of new to the whole EJB model.  I'm using as7.1.0.FINAL as my app server

 

I have a web app where i am using some @Stateless EJB's that are deployed in the war with the rest of my app and i'm using @Inject to access them. 

this works fine and i'm comfortable with this.

 

There is some functionality that i have that i would like other apps that are running on the same instance of AS 7 to access.

 

I've created a simple EJB(hello world) and deployed it. 

 

code:

 

public interface IHelloWorld {

 

 

    String sayHi(String value);

 

 

}

 

 

@Stateless

public class HelloWorld implements IHelloWorld

{

    @Override

    public String sayHi(String value) {

        return value; 

    }

}

 

 

 

 

console:

11:01:53,172 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named HelloWorld in deployment unit deployment "WebLogger.jar" are as follows:

 

 

          java:global/WebLogger/HelloWorld!mlmic.IHelloWorld

          java:app/WebLogger/HelloWorld!mlmic.IHelloWorld

          java:module/HelloWorld!mlmic.IHelloWorld

          java:global/WebLogger/HelloWorld

          java:app/WebLogger/HelloWorld

          java:module/HelloWorld

Reply to this message by going to Community

Start a new discussion in EJB3 at Community