File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes orielly ejb3 book, @RemoteBinding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "orielly ejb3 book, @RemoteBinding problem" Watch "orielly ejb3 book, @RemoteBinding problem" New topic

orielly ejb3 book, @RemoteBinding problem

Ash More'
Ranch Hand

Joined: Apr 20, 2008
Posts: 47
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

Joined: Jul 20, 2005
Posts: 10441

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".

[My Blog] [JavaRanch Journal]
Ash More'
Ranch Hand

Joined: Apr 20, 2008
Posts: 47
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

Joined: Apr 20, 2008
Posts: 47
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' ]
I agree. Here's the link:
subject: orielly ejb3 book, @RemoteBinding problem
jQuery in Action, 3rd edition