When reading this chapter, there is basically no obstacle, but there is a local article that is wrong.
In the create Dao interface section,"Go to SRC> Add package named au.com. tusc. Dao> Add a class storeacessdaoimpl in that package"The red font is incorrect. It should be storeaccessdaoimpl.
Another reason is that different versions of JBoss and lomboz are used.Ejbgenerate. xmlThe file correspondsXDoclet. xmlFile.
Stateless Session Bean
The steps required to create an EJB component are described in mastering EJB 2nd.
1. Write the. java files that compose your bean: The component interfaces,
Home interfaces, enterprise Bean class file, and any helper classes you
Might need. With the help of lomboz, I only need to write the enterprise Bean class file. In this chapter, storeaccessbean is the enterprise Bean file. Add several tags at the beginning of the file, such as @ EJB. Dao. lomboz will automatically generate the storeaccessdao file.
2. Write the deployment descriptor. lomboz will automatically create the relevant deployment File
3. Compile the. java files from step 1 into. class files. Writing your first Bean
4. Using the jar utility, create an EJB-JAR file containing the deploymentdescriptor and. class files.
5. deploy the EJB-JAR file into your container in a vendor-specific manner, perhaps by running a vendor-specific tool or perhaps by copying yourejb-JAR file into a folder where your container looks to load EJB-jar files.
6. configure your EJB server so that it is properly configured to host yourejb-JAR file. you might tune things such as database connections, thread pools, and so on. this step is vendor-specific and might be done through
Web-based console or by editing a configuration file.
7. Start your EJB container and confirm that it has loaded your EJB-JAR file.
8. optionally, write a standalone test client. java file. compile that test client into. class file. run the test client from the command line and have it exercise your bean's APIs.
3 ~ Step 8 lomboz will automatically help me. It seems that with lomboz, you can really focus on developing business logic.
However, when this example is implemented, a typical error of deploying ejbs occurs again, that is, the tag statement is wrong, which can only be known after deployment, it cannot be compiled for verification, and it is difficult to find an error. The only way is to open the lomboz document and copy and paste it. I hope there will be fewer errors. Or wait until I find a more advanced tool for verification.