• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Stand alone Client  RSS feed

 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
In a web client the EJB's are accessed through the HTTP protocol which works on TCP/IP connection.
When I have Standalone client, what is the connection protocol which is used to get the access to EJB on application Server.
Thanks.
------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB's are always accessed through the RMI/IIOP protocol regardless of whether or not the client is a servlet, a JSP or a Java application. Some application servers (Weblogic) support a proprietary, non-standard RMI protocol (T3) but the spec mandates RMI over IIOP.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kyle,
I didn't know that.
I thought in browser client, the request to EJB is through HTTP.
Can you please explain your answer a bit.
Also since IIOP is a communication protocol, on what does it connect the server. I mean does it use TCP/IP as the connection protocol? ( Like HTTP ).
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Browsers can't connect directly to EJB's. Browsers can only connect to JSP's and Servlets since they only use the HTTP protocol. If you want to build a browser-accessible front end to an EJB you must build a Servlet or JSP and then connect to the EJB from there.
IIOP is a standard protocol from the OMG (It's the Internet Inter-ORB protocol). It's based on TCP.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kyle.
But one last question
please tell me how this scenario works :
I have a standalone client on a Machine A and the J2EE server on machine B. Now How to connect to the EJBs on the Machine B to access the EJBs. Since we have to use RMI/IIOP as communication protocol. So what is the connection protocol. Is it TCP / IP ??
If its so then how to do it. ?
Thanks for the time.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB client stubs know how to connect to the server using RMI/IIOP. You don't have to do anything special. You just write your program using the EJB client API's and it all happens for you.
I suggest you get Richard Monson-Haefel's "Enterprise JavaBeans" book and read through it. It explains this in more detail. Another suggestion is to read the EJB specification, which should also help.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!