users@glassfish.java.net

EJB 2.1 Compatiblity Problem

From: <glassfish_at_javadesktop.org>
Date: Fri, 02 May 2008 01:13:23 PDT

For compatibility reasons, all my stateless sessions must expose a EJB 2.1 view.

For the same reasons, all my stateless sessions' remote home interfaces must extend from the same super interface. Let's call it "SuperHome". The reason is that the client (which cannot be modified) uses "SuperRemote SuperHome.create()" to create sessions dynamically and return the SuperRemote interface (it does not know at compile time what actual session bean it talks to, since that information is provided at runtime by dynamic configuration).

To accomplish that, each SB's Home Interface extends SuperHome, and SuperHome has a method "SuperRemote create()". SuperRemote is extended by each Session's Remote Interface.

The compiler and the verifier is fine with that (as it is valid Java EE), but when deploying in GlassFish it says that it is not possible that both, the Session's own Home Interface AND SuperHome, have a method called create(): Session Bean'
s Home Interface create() returns Session Bean's own Remote Interface, while SuperSession's create() return SuperRemote. In fact I do not understand the problem since Session Bean's own Remote extends SuperRemote, so the contract is valid.

Can anybody tell me why GlassFish has a problem with that and what to do against it?

Thanks!
Markus
[Message sent by forum member 'mkarg' (mkarg)]

http://forums.java.net/jive/thread.jspa?messageID=272488