• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to execute ejb3.0  RSS feed

 
srikanth arroju
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i deployed a entity bean(ejb3.0) using ant into jboss but how to execute that jar file.
i used run command of ant but it generating exception
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth,
You don't execute a jar file. You can call a JPA (EJB 3) entity from a session bean or servlet (or another class using JNDI lookup.)

What does your Ant script do? What error is it giving you? More details will help you get a more targeted answer.
 
srikanth arroju
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i enter at command prompt
ant run

[java] Exception in thread "main" javax.naming.NameNotFoundException: remot
e not bound
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth,
It sounds like you Ant calls a Java client which calls the EJB. This is allowed for remote beans. Note that there is no such thing as an entity bean in EJB 3.0. JPA replaced it and JPA doesn't have remote calls that I know of. This means that you either have an EJB 2.1 style remote entity bean (which should be avoided for new code since it will not be supported at some point) or something that will not work. Good practice is to wrap the JPA entity or entity bean in a remote session bean.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!