5 Replies Latest reply on Nov 29, 2013 5:04 AM by nicolyra

    Override remote EJB injection mechanism

    nicolyra

      Hello all,

       

      I currently migrate applications from JBOSS-AS5 to JBOSS-EAP-6(.1.1). I want to improve our server-to-server remote EJB call my using @EJB annotation but we have a specific architecture and I don't know what I have to do.

       

      I have two applications (myapp1 ans myapp2), and three servers (srv1, srv2 and srv3).

      The application myapp1 is deployed on srv1, myapp2 is deployed on srv2 AND srv3.

      Currently, we use a JNDI lookup to allow EJB in myapp1 to call EBJ in myapp2. First, we try to get myapp2 on srv2 and, if we detect exception, we try to connect to srv3.

      I implemented my own DeploymentNodeSelector to force srv1 to respect our needs (connect srv3 only if srv2 has error).

       

      Now, I would like to facilitate developers life by using @EJB annotation to inject remote EJB...

      However, I don't know :

      * What are the interfaces to implement / classes to extend in the way to use our mechanism (connect srv1 to srv2 and immediately to srv3 in case of problem),

      * What file to configure in the way to prevent JBoss to use my implementation and not the default.

       

      Thanks in advance for you help!

       

      Nicolas