-
1. Re: EJB3Deployer and EJB3ClientDeployer order
starksm64 Mar 21, 2008 12:35 PM (in response to aloubyansky)The client deployer may run first, but it should be creating dependencies for the refs. I'm in the process of updating this, but have not made any changes yet.
-
2. Re: EJB3Deployer and EJB3ClientDeployer order
aloubyansky Mar 21, 2008 6:41 PM (in response to aloubyansky)Yes, I see now, thanks.
It does look into the JBoss5DeploymentScope which is empty at the moment but the whole point is not to find the deployment it depends on but to make sure it's not a dependency on self. So, that's fine. -
3. Re: EJB3Deployer and EJB3ClientDeployer order
aloubyansky Mar 25, 2008 10:45 AM (in response to aloubyansky)What I'm seeing now is that if I have two EJB JARs in an EAR and each JAR has an EJB that has an ejb-ref to an EJB in the other JAR (creating circular dependency), the deploy will fail.
-
4. Re: EJB3Deployer and EJB3ClientDeployer order
starksm64 Mar 25, 2008 12:24 PM (in response to aloubyansky)I'll add this scenario to the RefResolutionUnitTestCase I'm working on. The dependencies are being moved to the container level, not the module/deployment level so this is not a circular ref unless its truly a beanA to beanB to beanA reference.
-
5. Re: EJB3Deployer and EJB3ClientDeployer order
aloubyansky Mar 25, 2008 7:35 PM (in response to aloubyansky)Yes, it's circular in the case I am looking into. Two EJBs are referencing each other and each one is in its own JAR.
It seems like one is chosen to be deployed first but it fails since the other EJB can't be found in the JNDI. -
6. Re: EJB3Deployer and EJB3ClientDeployer order
starksm64 Mar 25, 2008 8:57 PM (in response to aloubyansky)Is that a scenario that is supposed to work?
-
7. Re: EJB3Deployer and EJB3ClientDeployer order
aloubyansky Mar 26, 2008 3:10 AM (in response to aloubyansky)It's a CTS test, issue JBCTS-755.
-
8. Re: EJB3Deployer and EJB3ClientDeployer order
wolfc Mar 26, 2008 4:00 AM (in response to aloubyansky)A true circular dependency (injection) can not work in our current setup. For that we need to refactor the container and the (SFSB) cache to start working before we have method-ready instances.
Here the circularity happens after deployment by JNDI lookup. That should work.
The problem here is that jboss.xml defines home-jndi-names for EJB 3 beans, that's illegal and completely throws of the ReferenceMetaDataResolverDeployer. -
9. Re: EJB3Deployer and EJB3ClientDeployer order
aloubyansky Mar 26, 2008 6:46 AM (in response to aloubyansky)The jboss.xml files attached to the case are what Schelly tried manually. Actually those didn't work for me. They failed to deploy due to parsing errors, i.e. home-jndi-name is not allowed as child of ejb-ref.
The generated jboss.xml's don't have them. But the circularity issue is still there. -
10. Re: EJB3Deployer and EJB3ClientDeployer order
wolfc Mar 26, 2008 8:43 AM (in response to aloubyansky)Ah yes, I was looking at an old setup.
-
11. Re: EJB3Deployer and EJB3ClientDeployer order
starksm64 Mar 28, 2008 12:59 AM (in response to aloubyansky)In general a circularity even via jndi cannot work. If we for example prefilled the stateless session bean pools, or some other component references and uses one of these ejbs on startup, its allowed for EjbLink1Bean to lookup EjbLink2Bean from within its PostConstruct callback for example, so its really no different than using an @EJB dependency injection reference. Both imply a startup dependency on the target ejb container.
I don't see how I can know this circular dependency is ok and should not be registered with the mc. It requires a very deep analysis of the beans in question to know they have no injection, no life cycle callbacks. All I can see is that a deployment could specify an ignore-circular-dependecies flag to allow this type of deployment to not fail. -
12. Re: EJB3Deployer and EJB3ClientDeployer order
wolfc Mar 28, 2008 4:51 AM (in response to aloubyansky)You're right. It must be handled with an ignore dependency. I overlooked the PostConstruct scenario.