• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB 3.0 Entity Bean

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me the steps to create EJB 3.0 Entity Bean in Eclipse 3.3.2 with JBoss Applicaion server. I had created a sample Application but while lookup its throwing error such as javax.naming.NameNotFoundException: EntityBean not bound
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Aj an"

Please click the "My Private Messages" link (at the top of this page) for a message from JavaRanch.
 
Ajan Raj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:"Aj an"

Please click the "My Private Messages" link (at the top of this page) for a message from JavaRanch.




Hey i don't understand what you are expecting me to do. Eventhough i had changed the name you are sending the same message.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ajan Raj wrote:

Eventhough i had changed the name you are sending the same message.



I sent it only once, before you changed your display name.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the source for your entity bean? And the code that is using it, which I assume is the code that is getting the NameNotFoundException. Don't forget to wrap the code in 'code' tags.
 
Ajan Raj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Peter Johnson wrote:Could you post the source for your entity bean? And the code that is using it, which I assume is the code that is getting the NameNotFoundException. Don't forget to wrap the code in 'code' tags.



I am new to EJB. I had download a sample example and work on that.

In the servlet i am Using

These are the files which i am using in the ejb.
Book.java
BookBean.java
BookLocal.java
BookRemote.java.

And herewith i have given the code.

BookLocal.java




BookRemote


BookBean.java

Book.java


Can you help me out from this problem


 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

...
import javax.persistence.PersistenceContext;
...

public class BookBean implements BookLocal, BookRemote {



This one is missing the @Stateless annotation. Hence its not considered a bean.

Add this:
 
Ajan Raj
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot jaikiran. It works fine. Can you please tell me the site to get EJB 3.0 tutorial. By google search i am getting a lot. But i want to know from the basic. Can you suggest me the site.



Jaikiran Pai wrote:

...
import javax.persistence.PersistenceContext;
...

public class BookBean implements BookLocal, BookRemote {



This one is missing the @Stateless annotation. Hence its not considered a bean.

Add this:

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB3.0 tutorial for JBossAS5 is here. For AS4.x, its here
 
    Bookmark Topic Watch Topic
  • New Topic