users@glassfish.java.net

Can not deploy inherited\shared bean

From: <glassfish_at_javadesktop.org>
Date: Thu, 02 Sep 2010 19:32:37 PDT

Hello,

I am finishing up a migration from GF v2 to v3 and this is (hopefully) the last issue I have. Please note, this application worked on v2 marvelously.

This is the problem I get when I try to deploy my ear:
'Session because there are 2 ejbs in the application with interface'

I am not sure, but from what I can tell, the problem stems from the fact that I have another ear already deployed that implements the same local interface.

Here is what I have deployed in ear 1:
+ lib
-- + base-dao.jar
+ test-dao.jar
+ test-webservice.war
-- + WEB-INF
-- -- + lib
-- -- -- + base-dao.jar
-- -- -- + base-webservice.jar
-- -- -- + test-dao.jar

ear 2 is pretty much the same, except wherever you see 'test' replace with 'prod' - really it is just using a different persistence.xml underneath it all.

So in the base-dao I have:
* Local interface (which is what the deployment claims I am trying to deploy more than one of)
* Abstract implementation class (does all the work, expects child classes to provide entity manager)

I think what it amounts to is this:
in ear1, test-dao
@Stateless( name = "SomeDomainSessionBeanTest", mappedName = "SomeDomainSessionBeanTest" )
public class SomeDomainSessionBeanTest extends SomeDomainSessionBeanBase implements SomeDomainSessionBeanLocal

in ear2, prod-dao
@Stateless( name = "SomeDomainSessionBeanProd", mappedName = "SomeDomainSessionBeanProd" )
public class SomeDomainSessionBeanProd extends SomeDomainSessionBeanBase implements SomeDomainSessionBeanLocal

in all instances of base-dao.jar:
@Local
public interface SomeDomainSessionBeanLocal

Is there a way to make this work in GFv3?

TIA
[Message sent by forum member 'javamonkey79']

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