• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Caching Home/Remote refernces across the firewall

 
Sandeep Lodhia
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic