Yes. Same ear. I'll do some more tests when I get my life back and post a JIRA for it. ;>
Quintin Beukes On Wed, Nov 11, 2009 at 12:30 AM, David Blevins <[email protected]> wrote: > > On Nov 6, 2009, at 2:23 AM, Quintin Beukes wrote: > >> I don't think this is a big problem. I just wanted to put it in there as a >> "surety" measure. Personnel-ejb depends on Platform-ejb, so it should load >> fine in such cases. I was just not sure if it is guaranteed that the bean >> will actually be started before this one if they depend on each other. > > The @DependsOn works for beans in the same application only. They can be in > separate jars just as long as they are part of the same EAR or Collapsed EAR > (i.e. ejbs in .war files). The @DependsOn is definitely not intended to > dictate start order between separate applications. > > This might be a flaw in the Geronimo integration. Are these two jars part > of the same ear? > > -David > >> On Fri, Nov 6, 2009 at 12:20 PM, Quintin Beukes <[email protected]> >> wrote: >> >>> Hey, >>> >>> It seems I can't depend on @Startup @Singleton beans from another JAR. >>> When >>> I do the following in module KMSPlatform-ejb: >>> @Singleton @Startup @DependsOn({"SiteBean"}) >>> public class InitializeDataBean implements InitializeDataLocal { ... } >>> >>> And this in module KMS-Personnel-ejb: >>> @Singleton @Startup @DependsOn({"InitializeDataBean"}) >>> public class KMSPersonnelEjbStartupBean implements >>> KMSPersonnelEjbStartupBeanLocal { ... } >>> >>> I receive the following error. It clearly picked up the correct path to >>> the >>> bean, but when looking for it, it seems that it only does so within it's >>> own >>> list of beans. >>> 2009-11-06 12:18:00,275 INFO [OpenEJB] Auto-deploying ejb >>> KMSPersonnelEjbStartupBean: >>> EjbDeployment(deployment-id=KMS-Personnel-ejb/KMSPersonnelEjbStartupBean) >>> 2009-11-06 12:18:00,276 ERROR [Deployer] Deployment failed due to >>> java.lang.IllegalArgumentException: No such object in list: >>> KMSPlatform-ejb/InitializeDataBean >>> at org.apache.openejb.util.References.sort(References.java:66) >>> at >>> org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:187) >>> at >>> >>> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:604) >>> at >>> >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:644) >>> at >>> >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:577) >>> at >>> >>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:502) >>> at >>> >>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:592) >>> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257) >>> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >>> at >>> >>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130) >>> at >>> >>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:850) >>> at >>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237) >>> at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342) >>> at sun.reflect.GeneratedMethodAccessor216.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>> >>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >>> at >>> >>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130) >>> at >>> >>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:850) >>> at >>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237) >>> at >>> >>> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172) >>> at >>> >>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) >>> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) >>> at >>> >>> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426) >>> at >>> >>> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) >>> at >>> >>> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at >>> >>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366) >>> at >>> >>> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) >>> at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source) >>> at >>> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) >>> at sun.rmi.transport.Transport$1.run(Transport.java:159) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at sun.rmi.transport.Transport.serviceCall(Transport.java:155) >>> at >>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) >>> at >>> >>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) >>> at >>> >>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) >>> at >>> >>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >>> at >>> >>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >>> at java.lang.Thread.run(Thread.java:619) >>> >>> >>> Quintin Beukes >>> > >
