i'm trying to run a simple hello world kind of ejb program in eclipse. here is what i did.
i created a new enterprise application project. after that there was an option of NEW MODULE . i clicked on it and it gave me option of creating default module. i created application client module and ejb module.
so in project explorer i have an enterprise application project with 2 modules viz. ejb module and client module. i right clicked enterprise project and clicked run on server. then i exported the application client module project as export > application client jar file. i placed the jar file in the location of appclient binary of glassfish. i invoked appclient - client Testclient.jar and it gave me error that it cannot find class HelloUser.
i have included ejb moduel project in build path of application module. Please help ?
if i dont create enterprise application project but just create ejb project and put all 3 files in the single project then it runs fine.
Trying to access an EJB from a Java SE project or the ACC (Application Client Container) is always a bit tricky as you need to configure some things manually. The best way is to test from a Servlet, as you are now quite familiar with Servlets. Injection of an EJB in a Servlet doesn't need any extra configuration.