1 Reply Latest reply on Apr 18, 2003 2:29 PM by Juha Lindfors

    Active components?

    Haug Bürger Newbie

      I would like to know if JBoss is the container that fits to my needs.
      I need an active component, a thread, that handles a certain protocol and forewards some data to a Servlet/JSP/SessionBean. I have not found any standard to plug in an active component into a container, is J2EE missing such a thing?
      I currently use a tomcat 4.0 connector to do that but it has some features missing.
      a) I want to update the code without shutting down the container.
      b) I want to start and stop the threads with a JMX application.
      c) I want a cleaner deploy process.
      d) I want an environment (Logging, JNDI env., Classloading ...) set up before my service starts.

      Is the startup process well enough defined to handle active components? What services are available when my components start up? Is the JMX support generic enough to include my MBeans? Can a Servlet communicate with the active component, can they share memory?

      Is JBoss the right choice to convert to? What do you think?

      Thanks
      Haug

        • 1. Re: Active components?
          Juha Lindfors Master

          > I would like to know if JBoss is the container that
          > fits to my needs.

          Yes it is.

          > I need an active component, a thread, that handles a
          > certain protocol and forewards some data to a
          > Servlet/JSP/SessionBean.

          Yes, a custom invoker.

          > I have not found any
          > standard to plug in an active component into a
          > container, is J2EE missing such a thing?

          JMX is the mechanism to do that, it's been missing in J2EE for a while but will now be included in the next 1.4 version.


          > I currently use a tomcat 4.0 connector to do that but
          > it has some features missing.
          > a) I want to update the code without shutting down
          > the container.

          We do support hot-deployment of all services (SAR files).

          > b) I want to start and stop the threads with a JMX
          > application.

          The existing invokers (and your custom one) are all MBeans in JBoss, therefore you can expose your own custom management interface for your JMX app as well.

          > c) I want a cleaner deploy process.

          Package your invoker as a SAR, drop it into the deploy dir. This is the same process as we do with EJBs.

          > d) I want an environment (Logging, JNDI env.,
          > Classloading ...) set up before my service starts.

          You can declare dependencies for your service as part of its configuration (META-INF/jboss-service.xml in your SAR package).


          > Is the startup process well enough defined to handle
          > active components?

          JBoss service contract includes the normal create/start and stop/destroy callbacks to your service implementation.

          > What services are available when
          > my components start up?

          Up to how you configure your service startup, both explicit and implicit dependencies to other services are supported.

          > Is the JMX support generic
          > enough to include my MBeans?

          Yes, what you describe has been done before (custom protocol handling) and is exactly what JBoss does with current RMI/HTTP/etc invokers.

          > Can a Servlet
          > communicate with the active component, can they
          > share memory?

          Yes and yes. Servlet can access your service via the MBeanServer.


          > Is JBoss the right choice to convert to? What do you
          > think?

          Guess :-)