Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

orielly ejb3 book, @RemoteBinding problem

 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am currently practising examples from orielly ejb3 book,
in the 4th chapter(i.e chapter 24 of workbook), i am running the example as given in the book,

The session bean is as follows:


The client is as follows:


However i get the following errors:


however when i try the following in client code it works:


why is @org.jboss.annotation.ejb.RemoteBinding
(jndiBinding="TravelAgentRemote") not working
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of JBoss and Java do you use? Are you sure the application (containing the EJB) has deployed successfully without any errors? Also, use the JNDIView to check whether your bean is actually bound to "TravelAgentRemote".
 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am using jboss 4.2.0 GA , java 1.6
i am trying the examples as is from the workbook(currently on chapter 4, workbook chapter 24)

well 24.1 and 24.3 both work
24.1 using jndiContext.lookup("TravelAgentBean/remote");

24.3 using jboss.xml as


however 24.2 i.e using @org.jboss.annotation.ejb.RemoteBinding(jndiBinding="TravelAgentRemote")does not work

the JNDIView does not have TravelAgentRemote named bean.

is there anything else required to be configured along with @RemoteBinding annotation ??
 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved.
Solution: Do not keep duplicate copies of session bean having @RemoteBinding in C:\JBoss\jboss-4.2.0.GA\server\default\deploy directory. I had used the same named (TravelAgentBean) session bean in two different applications and had deployed both the applications in C:\JBoss\jboss-4.2.0.GA\server\default\deploy directory. This created problems with @RemoteBinding.
[ May 15, 2008: Message edited by: Ash More' ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic