开发者

Is it possible to invoke EJBs running on Java 1.4 through client using Java 1.5?

We have one scenario where we don't want to change the server JVM which is running on Java 1.4. But the client is using Java 1.5, and we are getting exceptions while calling the EJB. We are not sure whether it's our application issue 开发者_JAVA百科or an EJB server-client JVM compatibility issue.


You deal with forward compatibility (FC) because you are trying to run new client (1.5) with old server (1.4). Java is not guarantee FC. It's just guarantee backward compatibility (BC) as described in Incompatibilities in J2SE 5.0 since 1.4.2 (mirror at www.oracle.com):

JDK 5.0 is upwards binary-compatible with Java 2 SDK, v1.4.2 except for the incompatibilities listed below. This means that, except for the noted incompatibilities, class files built with version 1.4.2 compilers will run correctly in JDK 5.0.

Note: Sun documentation writers call the term backward compatibility as upward compatibility (they describe it as "class files built with version 1.4.2 compilers will run correctly in JDK 5.0") , but this is a mistake, because: backward==downward (wiki) and forward==upward (wiki).


Not sure if this plays into what you are doing or not....

But you can get EJB 3's to talk to EJB 2's. However you have to do the communication EJB 2 style. So in your case with Java 1.5, you may need to make sure the client is looking up the EJB 2 (or 2.1 since you are JDK 1.4) in EJB 2 style lookup's.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜