-
1. Re: Dependency of modules inside of EAR file
ilgarm Jun 23, 2009 8:13 PM (in response to ilgarm)ok, I have figured out how to configure it, but the error I get is:
02:05:44,921 ERROR [AbstractKernelController] Error installing to Create: name=MSPDeployer state=Configured
java.lang.RuntimeException: Error creating MBeanProxy: jboss.system:service=MainDeployer
at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:415)
at org.jboss.mx.util.MBeanProxyExt.(MBeanProxyExt.java:99)
at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:394)
at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:349)
at org.jboss.deployment.SubDeployerSupport.createService(SubDeployerSupport.java:112)
.
.
.
at org.jboss.Main.boot(Main.java:221)
at org.jboss.Main$1.run(Main.java:556)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
at org.jboss.mx.util.MBeanProxyExt.init(MBeanProxyExt.java:407)
I have checked with jboss source code, here is that section:112 mainDeployer = (MainDeployerMBean) 113 MBeanProxyExt.create(MainDeployerMBean.class, 114 MainDeployerMBean.OBJECT_NAME, 115 server);
I expect that MainDeployer is already available at that moment, so I have tried to add dependencies on jboss.system:service=MainDeployer, but the same. What have I missed?
my jboss-beans.xml file:<deployment xmlns="urn:jboss:bean-deployer:2.0"> <bean name="MSPDeployer" class="deployer.JBossDeployer"> <depends>jboss.system:service=MainDeployer</depends> <property name="enhancedSuffixes">100:mq-service.sar,101:ejb.jar,102:service.sar,103:.war</property> </bean> </deployment>
Thanks. -
2. Re: Dependency of modules inside of EAR file
wolfgangknauf Jun 24, 2009 6:05 AM (in response to ilgarm)Hi,
I think you could place the Queue definitions in the ejb-jar (in META-INF\...-service.xml). This would probably work around the issue.
The EJBs should have @Depends annotations, which point to the Queues:@MessageDriven (activationConfig= { @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @ActivationConfigProperty(propertyName="destination", propertyValue="queue/MessageBeanQueue") }) @Depends(value = "...:service=Queue,name=MessageBeanQueue") public class MessageBean implements MessageListener {
Hope this helps
Wolfgang -
3. Re: Dependency of modules inside of EAR file
ilgarm Jun 24, 2009 3:41 PM (in response to ilgarm)Hi Wolfgang,
Thanks for your advice, @Deploy seems to be reasonable, but it does not help nor copying -service.xml to META-INF of ejb.jar, I think it is being ignored there.
don't know why @Deploy is not processed, because I specify exactly the same JMX queue name as I do in another -service.xml where I load my service mbeans, which are also dependant on queues.
So currently, I am just copying two files to deploy, .ear with application and .sar with queue definitions (which I copy first).
Thanks for your time!
Does anyone have experience with SubDeployers? -
4. Re: Dependency of modules inside of EAR file
alesj Jun 24, 2009 3:43 PM (in response to ilgarm)"ilgarm" wrote:
Does anyone have experience with SubDeployers?
SubDeployers?
There are none SubDeployers in AS5.
You have StructureDeployers or plain Deployers. -
5. Re: Dependency of modules inside of EAR file
alesj Jun 24, 2009 3:49 PM (in response to ilgarm)The old MainDeployer is just used for legacy/test purposes.
The new VDF layer completely replaces old deployers.
You should *not* rely on them any more.
What you could do, is add jboss-structure.xml file into your .ear/META-INF,
where you would list your sub-deployments or set your custom sub-deployment comparator.
See this on how to use jboss-structure.xml: http://www.jboss.org/community/docs/DOC-13178 -
6. Re: Dependency of modules inside of EAR file
ilgarm Jun 24, 2009 6:27 PM (in response to ilgarm)Ales,
Thanks a lot, this is exactly what I was looking for. I will try to configure it tomorrow.