What does the client require to access an EJB <BR>!_NEWLINE_!(If Bean is developed and deployed on a different machine other than !_NEWLINE_!the clients machine)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   gshkr_raj
Posted On:   Monday, February 4, 2002 02:34 PM

I am Developing EJB's for the first time using Blazix as my EJB Server. I was able to deploy my bean successfully and also I was able to make my client script work properly if I add the ebj.jar file (which was generated after deploying my bean) in my classpath. The question is : ( Note : I am tring to access the bean on a network to which I have access to. I Mean, I have access to the machine on a network which has the Blazix and weblogix server) If somebody has developed/deployed a bean on a different machine which I want to use in my client servlet/jsp/application script. How can I get acces   More>>

I am Developing EJB's for the first time using Blazix as my EJB Server.


I was able to deploy my bean successfully and also I was able

to make my client script work properly if I add the ebj.jar file (which was generated after

deploying my bean) in my classpath.



The question is :



( Note : I am tring to access the bean on a network to which I have

access to. I Mean, I have access to the machine on a network which

has the Blazix and weblogix server)



If somebody has developed/deployed a bean on a different

machine which I want to use in my client servlet/jsp/application script. How

can I get access to the home interface (since I don't have a

.jar file containing the home interface in it or a .jar file which was created when deploying

the bean by somebody)?



Because in the Script I have something like this :



(a) Context context = {I get the context}



(B) Homeexample1 homeeg = (Homeexample1) context({bean name});



So when I compile my script the jvm will fail when it encounters

the "Homeexample1" Interface at (B), because I have not set

the .jar file (with that interface, which I didn't develop) in my classpath.



Should I get the .jar file for the bean to get my servlets working or is there

any other method to make my scripts working. Most of the examples with ejb

they explain having the client and the bean on the same box and putting

the .jar file (which is generated by the ejb server after deploying) in the classpath.



If at all I get a jar file (which contains the interfaces), then in the production

environmnet if I am using 50 different beans developed by

fifty different groups, then should I get all the fiftry jar files

to make by servlet/application/jsp working.



I appreciate all your help.



Thank you.



/Raj.

   <<Less

Re: What does the client require to access an EJB <BR>!_NEWLINE_!(If Bean is developed and deployed on a different machine other than !_NEWLINE_!the clients machine)

Posted By:   prajakt_deshpande  
Posted On:   Monday, February 4, 2002 11:12 PM

you should have the following files on the client side :



the remote and home interfaces ( along with the helper or PK classes these files are refering) all these files are needed bcos the client needs to know the interface and not implementation .( if the securitymanager seting is not modified then u also need the stubs generated by the deployment tool, sepecific to the appserver )


apart from that u also need to have the standard ejb classes in the classpath.


hope it helps u


prajakt
About | Sitemap | Contact