I have 2 systems A and B located in separate machine.
A will pass an XML Request String to B, and B will return
an XML Response string to A.
My friend told me to write an EJB client sitting between
A and B, maybe there is a method called process() in EJB Client.
A can call XML_Response = EJB.process(XML_Request);
XML_Response process(XML_Request)
{
XML_Response = B.process(XML_Request)
return XML_Response
}
My question is why EJB client? My understanding is EJB client
will use EJB Beans. Any ideas?? Because A and B
are in separated machine and requires remote procedure call
mechanism for remote communications?
-
Use EJB client to communicate between 2 systems (3 messages)
- Posted by: Matt Louden
- Posted on: May 14 2004 22:25 EDT
Threaded Messages (3)
- Use EJB client to communicate between 2 systems by Paul Strack on May 15 2004 10:22 EDT
- Use EJB client to communicate between 2 systems by Matt Louden on May 15 2004 19:48 EDT
- Use EJB client to communicate between 2 systems by Paul Strack on May 16 2004 11:59 EDT
- Use EJB client to communicate between 2 systems by Matt Louden on May 15 2004 19:48 EDT
-
Use EJB client to communicate between 2 systems[ Go to top ]
- Posted by: Paul Strack
- Posted on: May 15 2004 10:22 EDT
- in response to Matt Louden
My question is why EJB client? My understanding is EJB client will use EJB Beans. Any ideas?? Because A and Bare in separated machine and requires remote procedure call mechanism for remote communications?
If A and B are on different machines, you will need some sort of remote communication protocol between the two.
EJB is not the only option, though. Since you are passing text data, there are lots of choices. You could also use Web Services, a Servlet (send XML dat in a POST request, get the response), JMS or even the old stand-by, RMI. -
Use EJB client to communicate between 2 systems[ Go to top ]
- Posted by: Matt Louden
- Posted on: May 15 2004 19:48 EDT
- in response to Paul Strack
Thanks.
If I want to stick in EJB client solution, how should i get started? Because I an new to EJB. I thought EJB client needs to communicate with EJB beans here? So I need to write EJB beans too? Please advise more... -
Use EJB client to communicate between 2 systems[ Go to top ]
- Posted by: Paul Strack
- Posted on: May 16 2004 11:59 EDT
- in response to Matt Louden
You need at least two components: the EJB (running on the server) and an EJB client. The EJB client calls the EJB.
You will also need an EJB server to host the EJB. There are a number of popular servers, some free (JBoss, Sun J2EE Server) and some not (Weblogic, Websphere).
EJBs are a big, complicated subject. It could take a week of study for you to figure out how to handle even a simple client-server interaction like the one you describe.
If you really want to go this route, I suggest you look at Sun's J2EE tutorial, which talks about EJB as well as some of the other alternatives I mentions (servlets, web services).
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html