6 Replies Latest reply on Jul 31, 2008 3:40 AM by timfox

    Remoting refactoring complete

    timfox

      At long last I have completed the refactoring of our remoting layer.

      Now we have a 100% generic shiny clean remoting abstraction into which is it's easy to plug any transport provide e.g. MINA or Netty.

      The layer has no dependencies on MINA. It was quite painful uncoupling some of our tightly coupled code. The end result is a much cleaner abstraction.

      As previously mentioned I have created an spi package. Any new provider is easily integrated by making an implemention of the AcceptorFactory, Acceptor, ConnectorFactory, Connector and Conection. The implementions of these are typically very thin since, as I say, I have moved all the generic code into our generic classes.

      Along the way I've been able to simplify and get rid of other stuff like ConnectionManager which is no longer necessary.

      Once the spi interfaces have been implemented, you need to register to the AcceptorFactory and ConnectorFactory with remoting otherwise it won't know about the transport.

      There are methods on ConnectionRegistry and RemotingService to register these programmatically. Or you can specify acceptor factories in the remoting config.

      On the client side, connector factories are specified by default in a file jbm-connector-factories.properties which is in the jar or can be overridden with another copy of that file on the classpath.