3 Replies Latest reply on Mar 8, 2002 9:19 AM by isik-a

    Applet-EJB or Applet-Servlet

    m_hustler

      Hi,

      I'm designing an applet as an EJB client. I am not sure if the best way to design this is to communicate with the EJBs via a Servlet. Or to communicate directly with the EJBs.

      I have tried both and communicating through the servlet works well, but it seems to be a level of overhead.

      I cannot get my applet to communicate directly with an EJB because of security problems. Its seems like lots of people encounter this, but no-one has clearly identified the solution.

      So my question is, should I be leaning one way or the other, or does each suit its own purpose?

      Thanks!
      mike.

        • 1. Re: Applet-EJB or Applet-Servlet
          danch1

          Personally, I'd communicate with a servlet. This _is_ a level of overhead, but at least you have some level of confidence that you'll be able to get through firewalls.

          • 2. Re: Applet-EJB or Applet-Servlet
            m_hustler

            Thanks, the more I read about this, it seems that applet-servlet-EJB is the way to do it. Anything else seems to be more of a hack.

            However, if anyone has any other opinions on this, I'd love to hear it.

            • 3. Re: Applet-EJB or Applet-Servlet
              isik-a

              I also want to access ejb from an applet over http-port. My idea was to use the apache-soap interface. My client calls a remote method over the soap protocol. The called method is in a package implemented as web service on the machine where also jboss/embedded tomcat are. The called method looks up for the bean and returns the bean to my applet. So far my idea. If I try to access my ejb directly from the client it works fine, and if I test my web service over soap without bean access it works fine, too. But all together doesn't work. I get a ClassNotFoundException for my home interface of the bean. Is the only way to access ejb from an applet really the access over a servlet?

              Thanks Andrea