Consuming an EJB
Can I consume EJBs made with Java EE 6 (JDK6) in an application made with JDK 1.4?
I am sorry but I am very new to EJBs and just trying to evaluate the possibilit开发者_如何学Cies of using Java EE 6 in one of our services.
Can I consume the EJB like shown in http://openejb.apache.org/hello-world.html from my JDK 4 compatible app?
You cannot run a Java EE 6 Application Server in a JDK 1.4, but you can execute an independent application in JDK 1.4 and consume (invoke remotely) EJBs from whatever Java EE Application Server (included version 6 ones) retrieving a reference to it by JNDI (as usual).
The remote communication (behind scenes) is done via RMI, which is compatible between JDK1.4 and JDK6.
精彩评论