jndi binding on jboss4.2.3 and ejb3
Posted
by
broschb
on Stack Overflow
See other posts from Stack Overflow
or by broschb
Published on 2011-01-05T05:08:54Z
Indexed on
2011/01/05
22:53 UTC
Read the original article
Hit count: 289
I am trying to deploy a stateless ejb on jboss 4.2.3 using ejb3 annotations. Everything builds and deploys correctly, and I do not get any errors when jboss starts up. However the ejb is not getting bound to any JNDI location for lookup when I look at the bindings in jboss. Below is what I have for my ejb.
Remote
@Remote
public interface TestWebService {
public String TestWebMethod(String param1, String param2);
}
Stateless EJB
@Stateless
@RemoteBinding(jndiBinding="TestWeb")
@Remote(TestWebService.class)
public class TestWebServiceBean implements TestWebService{
public String TestWebMethod(String param1, String param2) {
System.out.println("HELLO "+param1+" "+param2);
return "Welcome!!";
}
}
I have tried not having the @Remote and @RemoteBinding and it doesn't make a difference. I have also added and ejb-jar.xml file (which should not be needed with ejb3) and that does not appear to make a difference. Below is the output I see in the jboss log on startup.
installing MBean: jboss.j2ee:ear=ejb_web_service_ear-0.0.1- SNAPSHOT.ear,jar=ejb_web_service-0.0.1-SNAPSHOT.jar,name=TestWebServiceBean,service=EJB3 with dependencies:
21:56:00,633 INFO [EJBContainer] STARTED EJB: com.tomax.ejb.TestWebServiceBean ejbName: TestWebServiceBean
© Stack Overflow or respective owner