This content has been marked as final. Show 5 replies
Using the DeploymentSorter will allow you to govern the deployment order. Check the conf/jboss-service.xml for more information.
One way is to bundle your EJB components into SARs, as the default deployment sorting will deal with SARs, then RARs, etc.
You can also switch to the prefix deployment sorter which works on numerical values at the start of the file URL. 1Bean.jar would be deployed by 2Bean.jar and so on.
These work for the 3.0.x and 3.2.x distributions. Note that this isn't particularly portable. The manuals cover this topic in detail.
I use the PrefixDeploymentSorter now - it works.
This too worked for me, but I would like a more elegant solution. The problem I have is that I have two .EAR files that must be deployed in a particular order as the second .EAR requires some components that are deployed with the first .EAR file.
I fixed this by modifying .../conf/jboss-service.xml as mentioned above, like this (commenting the default and uncommenting the other):
<!-- <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute> --> <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
Then I name the one file 01_example_stuff.EAR
And the other file 02_example_stuff.EAR
This works of course, but I would like to know if there is a better solution?
As usual, wonderful response from these forums!
I can't wait till we migrate to Websphere so I can actually get some support. What a worthless product.
dlastoria - You have already said that you have been able to get it to work (Which is the same as everyone else can do)- you are only looking for a better solution (Which maybe you should write and contribute to JBoss).
I am not sure about multiple ears but the deployment order within an ear can generally be controlled with depends elements.
I can't wait till we migrate to Websphere so I can actually get some support. - Who said that you were entitled to free JBoss support, how much have you paid for a support contract?
What a worthless product. - Just because you are incapable of working out how to use it does not make it a worthless product.