File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Can we not have a..... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can we not have a....." Watch "Can we not have a....." New topic

Can we not have a.....

Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
Can we not have a client, that is not a servlet, access an EJB method?

[This message has been edited by Suneel Setlur (edited August 22, 2001).]

Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Yes, non-servlet clients are possible. All that a client has to do to access the EJB is look up the Home Interface through JNDI and then get a Remote reference from there. This works fine in JAVA-based applications, although there may be some security issues with using EJBs and applets (I haven't tried that out yet...). If anybody knows if there are these security issues, I would be interested to hear what they are and how/if you can get around them.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
One of the biggest issues might be firewalls. Generally you would have your Webserver listening on port 80 and your app server on some unprivileged port. The firewall administrator in that case must specifically open a port which will probably be something he won�t like ;-)
The solution for this would be something like webservices (comes with wls6.1 but can be done on any app server with some coding). In this scenario, the applet would call a servlet with some XML (SOAP) as parameter and the servlet would respond with some other XML.
I agree. Here's the link:
subject: Can we not have a.....
It's not a secret anymore!