This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 9913

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' ]
subject: orielly ejb3 book, @RemoteBinding problem
Similar Threads
JPA using Hibernate - Entity Manager doubts
Hi, why am I getting this exception on console
NamingException: Could not dereference object - EJB 3.0 workbook ex05-2
TestEJB not bound