4 Replies Latest reply on Mar 19, 2002 12:40 PM by rols

    one exported object per bean?

    rols

      I've been struggling through the documentation on jboss and trying to understand the ejb container.

      Am I correct in thinking that there is a separate instance of JRMPContainerInvoker made and exported for
      each class of bean deployed?

      We have some jars which deploy a lot of beans (I just counted 388 in one of them!) Are we going to chew up one socket per class?

      If that's the case, has any thought been given to making a single ContainerRemote implementation which could be instantiated and exported once and serve requests for many different bean types, using some information in the MarshalledObject to determine what you're supposed to be doing?

      Roland

        • 1. Re: one exported object per bean?

          There is only one server socket open on port 4444 by
          default. I couldn't find any simple docs on how this
          works, sorry.

          Regards,
          Adrian

          • 2. Re: one exported object per bean?
            rols

            I didn't mean the well-known sockets used by the server (I think there are actually more than that, the naming service starts on 1099, there is a management web interface on another port etc), I was taking about the beans which are deployed. As far as I can tell, for each bean class deployed, a new JRMPContainerInvoker is created and that, when started, exports itself for RMI calls in the usual way (on an server-selected port). If that's the case, then a bean jar containing 388 beans will create and export 388 JRMPContainerInvoker's on 388 ports. That's a lot of ports. I wanted to know if my understanding of this is correct or if there is really just one JRMPContainerInvoker for the whole server.

            • 3. Re: one exported object per bean?

              You are correct, but only JBoss2.4.x.
              I didn't spot your class name before.

              JBoss3.0 only exports one
              org.jboss.invocation.server.JRMPInvoker

              part of the invocation that goes across the wire in 3.0
              is the jmx name of the container.

              Regards,
              Adrian

              • 4. Re: one exported object per bean?
                rols

                oh good, that meant I understood the documentation at least. I didn't really want to upgrade to 3.0 until I get 2.4 running (since it comes with nice Tomcat integration which runs right out of the box).

                Of course now I read it properly, your first message was correct and specifying the rmiPort in the config exports all those objects on the same port. I had not understood that you could do that, I was naively thinking that the UnicastRemoteObject bound its own port and listened, a look at the code shows of course that there is an underlying TCPTransport which binds the port and thus many UnicastRemoteObjects can be listening on the same socket.

                Thanks for your help. I'm 4 days into the docs and feeling overwhelmed trying to prove we can run what is currently a HUGE Weblogic app on Jboss.

                Roland