Link to home
Start Free TrialLog in
Avatar of vijaychandarn
vijaychandarn

asked on

How to create STUB?

I have written a stateless bean and deployed it in Weblogic. The client is working well if it is a stand-alone client Java program.
Now I am trying to run the client as a JSP running in a Tomcat in a different machine. The problem I am facing is how to create the client-Stub out of Weblogic and use it in Tomcat running in a different machine.
Note: Weblogic version 6.x and Tomcat version 4.1.9. Both are running in Windows 2000 Pro.
ASKER CERTIFIED SOLUTION
Avatar of AmitBadheka
AmitBadheka

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidjd
davidjd

Do not create any STUB file,
all you need is include the weblogic.jar file in the Tomcat classpath (you can use the setclasspath.bat file)
Best way to do it is create client jar for you ejb while deploying you ejb jar. You can do it giving  <ejb-client-jar>  element in your ejb jar xml.

and when ever you gonna deploy ur ejb. its gonna create a client jar having all client classes required to call the ejb.

Take this jar and put in classpathof ur tomcat application. and you can make calls to ejb on weblogic using these classes.

Thanks
Sandeep Kumar
hi AmitBadheka

                              did soleve the problem.... if so award the points
There is no need to create the STUB & SKELETON in the jars. You  need to specify the Facotry method for the Weblogic in the client location i.e ur JSP file. And try to look up from the JSP though you are form TOMCAT. Please try this one