I am going through the tutorials and trying to create my first Remote EJB using Netbeans. I am stumped at one area. Hoping that someone can share there thoughts:
I followed instructions on http://wiki.netbeans.org/DevelopJavaEE6App to create an EJB project. The one thing that I did different was create a Remote EJB vs a local EJB. When I created the project I got EJBTestClient, EJBMyProject, EJBMyProject-ejb and EJBMyProjectRemoteInterface. I created a new MyBean (package com.myproject.ejb) in EJBMyProject-ejb and added a business method. This worked flawlessly. The method was inserted in MyBean in EJBMyProject and a signature of it was created in MyBeanRemote in the EJBMyProjectRemoteInterface.
Here is the problem:
I added some entity classes using the database (package com.myproject.entity) in EJBMyProject-ejb. This worked fine. When I add a business method in MyBean using the entity class I get no problems in EJBMyProject-ejb. The business method is automatically also added in MyBeanRemote which is located in EJBMyProjectRemoteInterface, however package com.myproject.entity is never found. I would think that the reference for the entity beans would be automatically added, but they are not.
I created a new web application and added a session bean which is trying to access the Remote EJB. The project finds EBJMyProjectRemote with no problem, however it cannot find the entity classes. I am assuming I need to add the jar file for the entity classes here. But where would I find them?
Hopefully I am clear in explaining the above.
Thanks for your help in advance.
Joined: Feb 08, 2011
I was able to resolve problem two by going to the web project and adding a library for EJBMyProject-jar. When I try to add this to the EJBMyProjectRemoteInterface I get a circular reference issue.