java - @EJB in JBoss 5.1.0 GA? -


I am struggling for this for a while.

I am trying to prepare gear for EJB 3.0. I am using JBs 5.1.0 GA because my application server started with a very simple stateless session bean with the local interface and a simple zsp-sablet client, which invokes the session bean method. All this while I am trying to inject the session Ben in the servlet class to @EJB nubation.

  Expansion of the public class sample service HTTShareValvet {@ EJB Private personal person; Secure zero doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {System.out.println ("in servlet"); Response.getWriter () Type ("Person Name:" + person.getName ()); Println (person.getName ()); }}  

I am using jeboss 5.1.0 ga with the default configuration (I also tried with all configuration)

However, I used to get a blank reference for Session Bean injection. After struggling for one day or a day, with the configuration of JNDI specified in the jndi.properties file at the end, @EJB ugly EJB 2.x JNDI lookup instead of annotation Tried the method and it worked without any other changes!

Now, I tried to find out in the jeboss docs that jaboos 5.1.0 GA @EJB does not support injection with or annotation, but a solid answer Could not find So can someone tell me what does this do? The reason I really would like annotation on JNDI lookup (I mean, who will not?) Am I missing something ..?

Perhaps this should have been kept in the forums, but .. I am addicted to this place; -

This is definitely supported by JBoss 5.x because it is Java EE5 certified.

Actually, I suggest checking it out, they describe a detailed and step-by-step example.

And pay special attention to the following note:

To take injection in a web module, your web XML Web-App xsd:

  & lt; Web-app version = "2.5" Xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: xsi = "http://www.w3.org/2001/XMLSchema -instance" XSI: Schema location = "http: // Java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">  

Comments