I am developing a simple application with EJB 3.0 using OpenEJB for deployment and Eclipse as an IDE.
I created the project as a 'dynamic web application' in Eclipse. When I tried creating the first stateless session bean, I realized that the @Remote annotation could not be resolved.
What is the right way to fix this problem?
Thanks for helping.
Update: I found the answer.
TomEE's installation has a directory containing all the jar files needed to compile and run EJB's 'apache-tomee-webprofile-1.0.0-beta-2/webapps/openejb/lib'
I created a User Library in Eclipse containing all the jars from the lib folder described above and added it to the build path.
The EJB interfaces now compile properly.
Now you can create EJBs in the EJB project and call them from the WEB project.
And you can deploy or debug your EAP on an Application Server (like JBoss) that supports Enterprise Application Projects. The EAP is deployed as a unique file with .ear
extension.
If you use Tomcat for example you cannot deploy the ear packages.
Here a page with a description about creating ear with Eclipse.
A simple way to add eclipse library support for TomEE or TomEE+ is the following:
The tomEE libraries have been added to your eclipse project.
I'm using maven and get it work with the following simple steps:
That's it!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.