Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing EJB from Applets???

 
Satish Kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to access an EJB component directly from Applets (without using servlets or JSP)? If not, why? Please explain.
 
mohit joshi
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Applets operate with lot of security constraints, they cannot download classes from anywhere other then the server they were downloaded from. Even if an applet downloads all the required classes for remote method invocation, I dont think they will be allowed to talk to a different Server( EJB server ) because of security restrictions.
 
Gopalakrishnan Rangaswamy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i was going thro Ed Roman's Mastering ejb, in page 37 i saw a figure which shows applets(as clients) can access enterprise beans.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main thing you need for an Applet to access an EJB is to decide which protocol you wish to use. Applets can usually make use of RMI, back to the originating server, at least, unless there is a harsh firewall in between.
If RMI is not an option, consider an HTTP-tunneling solution, or even a completely HTTP-based EJB interface. For an interesting example of this see the EJB capabilities of the Resin web server at http://www.caucho.com/ .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic