• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB Netbeans: Entity Beans

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

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:

Problem 1

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.

Problem 2

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.

 
Sunny Jassal
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic