File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Caching Home/Remote refernces across the firewall Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Caching Home/Remote refernces across the firewall" Watch "Caching Home/Remote refernces across the firewall" New topic
Author

Caching Home/Remote refernces across the firewall

Sandeep Lodhia
Ranch Hand

Joined: Oct 09, 2000
Posts: 105
Hi,
In my project, I'd be accessing EJB(stateless)across the firewall, i.e. EJBs would be deployed in some other server.I'd access this server through network.Moreover there will be firewall.Communication between two networks is possible by opening ports.
My question is :
1. Can i cache home or remote reference once i get it from other server across the network?
Pls note that there are no security credentials on the EJB's. So there is no authentication.
Cheers.
Sandeep.
Dave Cronin
Ranch Hand

Joined: Apr 25, 2003
Posts: 114
It sounds like you may need the Service Locator pattern. This allows you to cache home objects for reuse, and to reuse a remote object with the help of its Handle (getHandle() from EJBObject).
If you can access the EJB across the firewall there should no problem using this pattern.
See http://java.sun.com/blueprints/patterns/ServiceLocator.html


Dave Cronin<p>SCJP,SCWCD,SCBCD
Ramon Gill
Ranch Hand

Joined: May 15, 2003
Posts: 344
Sandeep,
Dave is correct about the pattern to use. However, regardless of whether you use the pattern or not, you may get problems with the firewall (it depends how its been setup). Some firewalls are set up to prevent RMI access. You need to speak to your network guys to make sure you firewall is configured correctly for your application.
Ray Gill - SCJP, SCWCD
Vinod John
Ranch Hand

Joined: Jun 23, 2003
Posts: 162
Originally posted by Sandeep Lodhia:
Hi,
In my project, I'd be accessing EJB(stateless)across the firewall, i.e. EJBs would be deployed in some other server.I'd access this server through network.Moreover there will be firewall.Communication between two networks is possible by opening ports.
My question is :
1. Can i cache home or remote reference once i get it from other server across the network?
Pls note that there are no security credentials on the EJB's. So there is no authentication.
Cheers.
Sandeep.

You can cache the reference to home interface (why you want to cache the remote interface reference ?) but because you call the (RMI based) remote interface from outside the firewall, you should have to explictly set in the (app or rmi) server to use the DNS name instead of IP address.
For weblogic specific changes , check this out
http://edocs.bea.com/wls/docs61/ejb/EJB_design.html#1026610
 
 
subject: Caching Home/Remote refernces across the firewall
 
Threads others viewed
RMI Registry
EJB and firewalls
Application Security
Server behind firewall
problem /exceptions in sending a mail using JavaMail
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture