• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swing client and J2EE

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am bit confused in designing the communication between Swing Client and J2ee, Possible option I am thinking are

Client side
================
1) XML-RPC
2) Web Services
3) HttpURLConnection
4) RMI (would not prefer this due to firewall issue)

Server side
================
Going to use Front controller design pattern


Any suggestion are welcome

Thanks in advance
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to invoke EJBs from a Swing application, you can directly do the lookup. For this, when creating the initial context, you need to give the right URL for the server that you are accessing (which you can google to find out).
 
Suresh patel
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem of calling EJB in swing is the firewall ,as it communicate using RMI-IIOP and most of the firewall don't allow the communication
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is a simple type of communication then a simple URL solution would suffice.

If running within the intranet then you can use RMI-IIOP.

If running outside the intranet then I would suggest exposing your session beans as web-services. This should avoid all the firewall issues. However, there are other issues you need to deal with, like session management, etc.

XML-RPC is also a good and simple solution, we use it in our company. However I have not seen this described in any of Sun's material. So, I'll keep away from it, at least for SCEA.

Decide between RMI and web-services. Looking at the conversational state, performance requirements, etc would help you make this decision. I think it's safe to ignore XML-RPC and URL connection.

Good luck!
 
Suresh patel
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to me
Web-services should be used when the system are heterogeneous but I am not dealing with heterogeneous system as client is also java and server is also java .so I was thinking not to use Web-services.

Java pet store 1.3 version is using simple HttpURLConnection class for server communication so was considering that as one of the option.

Still things are not clear....

Any more suggestion are welcome
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"webservices should be used only for heterogeneous systems" ..this is a wrong assumption.... It is not mandatory.. actually it is better if it we use webservices in long run..tomorrow if you want you can change the client say .net etc... i believe nothing can replace webservices
 
mc khan
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes the PetStore does use URL connection, but if you look at the documentation you will find they are using it because the type of communication is very simple. So, if your requirements simple enough then can use URLConnection. Again, how would you manage session, security, transactions, etc. You can also look at REST webservices as an option.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic