Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
    Bookmark Topic Watch Topic
  • New Topic

calling an ejb from web(servlets/jsp/webservices)

Anna Madhusudhanan Natanagopalan
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi ,
I am getting error when a server side(Webservices / serlvets/jsp) program try to call an EJB.
I created a Test.jws (webservices) which is running in the Tomcat. then
I created a EJB(Test.jar) bean which is running in sun one application server.
I created a client program Test, It tries to communicate with Test.jws. It does. When the Test.jws is tried to communicate with EJB , it gives me CDRInputStream_1. (That is the Test.jws could not find the TestClient.ear).
Do i need to set the classpath for the TestClient.ear. I tried that also. but it doesn't.
What should i do to properly working this one.
Thanks and regards
Anna Madhusudhanan
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Report post to moderator
Using EJBs from any client follows the same basic steps:

You'll also need to declare an ejb reference in your deployment descriptors unless you use the actual name that your bean's home interface is bound to in JNDI in its container.
So as you can see, it doesn't have anything to do with classpaths, with the exception that you'll need to include the interfaces you use in your web application.
Bear Bibeault
Author and ninkuma
Posts: 65278
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Anna, please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
Please continue any discussion here since the EJB forum is the most appropriate forum for this question.
JSP Forum Bartender
    Bookmark Topic Watch Topic
  • New Topic