*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Connectivity Between Applets and Legacy Systems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Connectivity Between Applets and Legacy Systems" Watch "Connectivity Between Applets and Legacy Systems" New topic
Author

Connectivity Between Applets and Legacy Systems

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
There are many ways suggested in the articles for applets to connect to legacy systems. However, those articles did not take applet security and firewall into consideration when talking about applet connectivity.
Is it true that those connectivities may not work as straight as suggested under security considerations?
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Originally posted by JiaPei Jen:
There are many ways suggested in the articles for applets to connect to legacy systems. However, those articles did not take applet security and firewall into consideration when talking about applet connectivity.
Is it true that those connectivities may not work as straight as suggested under security considerations?

It really depends upon "how" you connect them. In order to avoid the security issues and the firewall issues, you'd probably have an applet that you download from a server. Your applet would contact the same server application via HTTP/HTTPS. The server application (probably a servlet) would act as proxy for the applet. The servlet could use jndi to lookup the resource that wrappers your connectivity to the legacy system and do whatever processing is desired.
In this way you are still using port 80 which should negate the firewall issue. You're communicating through the same server that you downloaded the application, so you don't have a connection creation issue due to browser security. The server can have full rights and access to the legacy system. Obviously some form of security should be placed between the applet and servlet communication to authenticate and authorize the user.
Regards,


Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Thanks for the explanation. In another word, signed/trusted or policy compliant applets are often required for the connection to legacy systems? For example, JNI is one of the options; however, applets cannot define native methods.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Also your firewall may restrict the kind of communication (i.e. protocol) you can use. You can use tunnelling, or you can simply create a proxy situation as a described where the server initiates transactions on the applet's behalf.
Regards,
SPAD
Greenhorn

Joined: Jul 09, 2002
Posts: 16
IMHO
A simpler solution will be to create a mid-tier that would deal with the legacy communication and expose the domain/data etc For example via Servlets. This will enhance re-usability and will scale better.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Originally posted by SPAD:
IMHO
A simpler solution will be to create a mid-tier that would deal with the legacy communication and expose the domain/data etc For example via Servlets. This will enhance re-usability and will scale better.

SPAD,
The only difference in what we suggested, is that I proposed the use of some wrapper around the legacy system which could be a resource adapter or a simple java class, which could be reusable. In fact, putting this wrapper around it rather than coding it directly in the servlet is MORE, not less reusable. There is no difference in scalability, although you could expose the legacy system through EJB's if you needed something to support transactions, etc...
Regards,
SPAD
Greenhorn

Joined: Jul 09, 2002
Posts: 16
Bryan,
expose via Servlet that is what I suggested not code in a servlet - you still need to wrap the legacy access in business delegates i.e., re-useable in any app or component e.g., even in a EJB
Regards,
SPADer
[ July 25, 2002: Message edited by: SPAD ]
Gerald Davis
Ranch Hand

Joined: May 15, 2002
Posts: 872
Applets are to messy; use servlets man
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connectivity Between Applets and Legacy Systems