• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse ejb ?

 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my ejb bean classes create on my desktop.
I am trying to do ejb thru eclipse. So I selected the new > ejb project in eclipse.

This gave me
ejbModule directory
META-INF
ejb-jar.xml
manifest.mf
an empty build directory

Right of the bat the project had one error because the ejb-jar.xml needed one ejb defined for it



Ok

so I quickly stole some code off a website and made my ejb-jar.xml
like


now under the deployment descriptor under SessionBean their is
hello which has
Hello
HelloHome
HelloBean
as subelements

But where or how do I add my classes into this project ?
Everytime I try to create a New > Session Bean it asks my for a EJB project to use but none are available from the drop down
 
Sam Doder
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind the project facet was set to EJB 2.0
Changed to EJB 3 and now lets me create a new SessionBean , EntityBean ,...etc

Curious though usually EJB where
Home , EJBObject ,... etc

I see they are using local , remote endings did they change this in EJB 3.0 ?

 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see they are using local , remote endings did they change this in EJB 3.0 ?

Yes. Quite a few changes have been made. For example for a stateless session bean all you need to do is annotate the POJO class with @Stateless annotation (if you are using annotation based configuration).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic