Hi everyone,
We are going to soon start developement on a application in which we would be requring to make Java Client (standalone -Swing/SWT App) to talk with J2EE server.
Now the main question which bothers me is Data exchange from client to server.
1) Using RMI/IIOP (JNDI approch)
2) Uisng Servlet (via URLConnection & exchanging xml files)
3) WebServices
Can someone please give me some input from previous project experiences as to which way of data exchange is best suited ?
-
J2EE - Java Client Tips Wanted (4 messages)
- Posted by: anand mandhre
- Posted on: January 27 2005 04:28 EST
Threaded Messages (4)
- What are your requirements? by Colin Yates on January 27 2005 05:09 EST
- J2EE - Java Client Tips Wanted by anand mandhre on January 27 2005 05:30 EST
- J2EE - Java Client Tips Wanted by Colin Yates on January 28 2005 07:30 EST
- J2EE - Java Client Tips Wanted by anand mandhre on January 27 2005 05:30 EST
- J2EE - Java Client Tips Wanted by anand mandhre on January 28 2005 07:37 EST
-
What are your requirements?[ Go to top ]
- Posted by: Colin Yates
- Posted on: January 27 2005 05:09 EST
- in response to anand mandhre
If your swing client is the only consumer of the server side services, then why not just use EJB?
If you need to support many different clients, in different languages, then maybe a servlet exposing XML (or web services :))
Can you be a bit more specific please :) -
J2EE - Java Client Tips Wanted[ Go to top ]
- Posted by: anand mandhre
- Posted on: January 27 2005 05:30 EST
- in response to Colin Yates
Hi Colin,
Well my requirement are simple java standalone client(s) fetching and posting information to the server..
I was concerned about n/w traffic and best practices..
I am going to use VO's(TransferObjects) for data exchange but wanted opinion on if Servlet or WebService approch could be benefical (faster)
Cheers -
J2EE - Java Client Tips Wanted[ Go to top ]
- Posted by: Colin Yates
- Posted on: January 28 2005 07:30 EST
- in response to anand mandhre
Are you using EJBs on the server? If so, it's easy!
Not too sure, but I think web services are stateless. Servlets on the otherhand can be stateful.
From what you have said, why not just use EJBs backed with POJOs with business logic.
Start of with the simplest possible solution and then complicate it if needs be :) -
J2EE - Java Client Tips Wanted[ Go to top ]
- Posted by: anand mandhre
- Posted on: January 28 2005 07:37 EST
- in response to anand mandhre
Thanks Colin,
As I found out I am confined to EJB'S (JNDI)cause WEBSERVICES would be statelesss (as u already mentioned)
Servlets would need session id which would needs to provided from the server, I was unable to work with it as it got invalidated everytime unless I start my app from a web page (after log in) using WEBSTART and giving session id as argument in JNLP file..