3 Replies Latest reply on Apr 12, 2006 7:41 PM by starksm64

    Remoting between EJB 2.0 and EJB 3.0

    robb.greathouse

      Hi, have client that has 30 machines that are running EJB 2.1. They would like to migrate to EJB 3.0; but migrating all 30 machines will be a long/difficult undertaking.

      The machines currently talk through RemoteInterfaces. If the EJB 3.0 beans have exactly the same Remote interface methods as the EJB 2.1 can they remote to each other?

      I guess the answer would be yes, since they will be running on completely separated machines each running its own JBoss server.

      Are there any known issues?

        • 1. Re: Remoting between EJB 2.0 and EJB 3.0
          starksm64

          The answer will be false out of the box because the remoting transport is completely different. The only way this would be possible is for the ejb2.1 deployments to use a new detached invoker that is based on the same remoting implementation that ejb3 uses. This should be possible.

          • 2. Re: Remoting between EJB 2.0 and EJB 3.0
            bill.burke

            Actually, I think Scott is incorrect, but maybe he understood the question better...


            EJB 3.0 has adaptor APIs for EJB 2.1. Basically you can write an EJB 3.0 bean and there is an adaptor pattern for Home interfaces and Remote interfaces.

            So, yes, it is possible...

            Here's more information:

            http://docs.jboss.org/ejb3/app-server/tutorial/ejb21_client_adaptors/ejb21_client_adaptors.html

            Its better to download the EJB3 distribution and play with it yourself as this doco and tutorial is in that zip.

            • 3. Re: Remoting between EJB 2.0 and EJB 3.0
              starksm64

              I viewed his question as could he taking an existing ejb-ref that points to a remote jboss-4.0.x/ejb2.1 implementation, and simply point that to a remote ejb3 implementation, and visa-versa. The forward direction would probably just work if the ejb3 client jars were included, but exposing a legacy jboss-4.0.x/ejb2.1 endpoint to a remote ejb3 component might not. Its just a question of how well the legacy and new remoting transports integrate. Its something that needs to be tried.