• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

EJB 3.0 Entity Bean

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB3.0 tutorial for JBossAS5 is here. For AS4.x, its here
 
You can't expect to wield supreme executive power just because
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic