Let's take a look at the implementation of EJB3 SLSB: Import Javax.ejb.Stateless; @StateLesSpublic Class Hellobean {private string_greeting = "default hello";
Public void setgreeting (string greeting) {_greeting = Greeting;
Public string hello () {return _greeting;}}
Then we look at the configuration method in XML: bean> ejb-server> What did we see? The configuration file passed "Hello, World" to setgreeting as a parameter. Of course, the EJB implementation generates a Hello interface according to the default value; the interface method is implemented, straight
Toned Return_Greeting; Is the IOC mode
Type2. It can be seen that the IOC mode used by EJB3 is similar to the IOC used by Spring. It has used Spring, and it is also a very good pavement for us to learn EJB3 later.