wood burning stoves 2.0
The moose likes EJB and other Java EE Technologies and the fly likes Accessing EJB from Applets??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Accessing EJB from Applets???" Watch "Accessing EJB from Applets???" New topic

Accessing EJB from Applets???

Satish Kumar

Joined: Mar 13, 2000
Posts: 13
Is it possible to access an EJB component directly from Applets (without using servlets or JSP)? If not, why? Please explain.

Satish Kumar
mohit joshi
Ranch Hand

Joined: Sep 23, 2000
Posts: 243

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

Joined: Sep 11, 2000
Posts: 5
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

Joined: Jan 07, 1999
Posts: 6920
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/ .

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link: http://aspose.com/file-tools
subject: Accessing EJB from Applets???
It's not a secret anymore!