-
1. Re: Deployment broken in 3.2.1
adrian.brock May 5, 2003 5:37 PM (in response to manuelf)3.2.1 was mistakenly shipped with
False
It should be "True".
Regards,
Adrian -
2. Re: Deployment broken in 3.2.1
adrian.brock May 5, 2003 5:38 PM (in response to manuelf)Sorry this is in
server/[config]/conf/jboss-service.xml
Regards,
Adrian -
3. Re: Deployment broken in 3.2.1
manuelf May 6, 2003 4:55 PM (in response to manuelf)Hi Adrian,
tried it with your mentioned setting - but without success. 3.2.1 behaves definetly different than 3.2.0 and before.
Can someone give me a hint how to package an application which consists of an ejb-app and some additional services, that depend on that ejb-app?
My working (until now) packaging was an sar archive containing 1 ejb-jar and 2 normal jar files for the services. In the jboss-service.xml 2 MBeans were started - their class files were in the 2 normal jar files.
After deployment jboss used to deploy the ejb-jar file first - the others second and started the service MBeans at the end.
JBOSS 3.2.1 fails to do this: normal jar files are deployed first (seems that the EJBDeployer is not yet started at that point - so deployment of ejb-jar is on the waiting list) Creating of the mbeans comes next, but fails due to the fact that the ejb-jar is not deployed yet and the mbeans reference remote interfaces of ejbs which are in the ejb-jar. After that the now started EJBDeployer fails, because the referenced datasource is not registered in JNDI at that point....
Really weired - the ordering in which services are coming up has obviously changed!
Cheers,
Manuel -
4. Re: Deployment broken in 3.2.1
adrian.brock May 6, 2003 5:24 PM (in response to manuelf)The recursive search should fix it?
The problem is the EJB deployer depends on
jms because of MDBs and JMS was moved to a
sub folder.
You can explicity make a dependency on an EJB
for your MBean.
Add the following to your MBean config.
jboss.j2ee:service=EJB,jndiName=whatever
Regards,
Adrian -
5. Re: Deployment broken in 3.2.1
manuelf May 7, 2003 4:34 PM (in response to manuelf)Hi again Adrian and thanks for your passion ;p
Sorry about insisting on that point - but I had to totally change my packaging to make my application deployable under 3.2.1:
What I did (a bit dirty IMHO):
1. pack my ejb-jar and the library-jars containing the classes of my mbeans in a sar file.
2. declaring a dependency on the ejb-modul (setting fixed jmx-name via jboss.xml descriptor in the ejb-jar) for each mbean
this alone would not help because:
As mentioned in my previous postings the main deployer deploys sar-files BEFORE EJBDeployer is up (due to the fact that EJBDeployer depends on other services that get deployed after my sar because sar files have highest priority). OK - this means the library-jars nested in my sar get deployed first - then the mbeans declared in jboss-service.xml are created and there it crashes because this mbeans reference ejb-interfaces which are in the ejb-jar, that is still on the waiting list for deployment since the EJBDeployer is not up yet.
OK - to fix this...
3. Extract the classes referenced from the mbeans from the ejb-jar and put it in a standalone jar and put it in the sar (dont duplicate it - remove these classes from the ejb-jar or you would get linkage error due to duplicate classes)
OK - now the sar deploys almost correctly - but during deployment of the entity beans I got errors because the datasource wasn't yet bound to jndi....
4. I added an additional dependency for the EJBDeployer on my jca-service.
Now everything deploys correctly.
The downside of this approach is, that I have to extract the ejb-interfaces from my ejb-jar - thats awfull! the ejb-jar would never deploy alone!
The underlying problem seems to be, that sar files get deployed too early (before needed Deployers are up) and that dependency declaration in mbeans dont delay the creation but only the start of the mbean. if the creation would be delayed it wouldn't be necessary to extract the ejb-interfaces from my ejb-jar ...
So long,
Manuel -
6. Re: Deployment broken in 3.2.1
manuelf May 7, 2003 5:59 PM (in response to manuelf)Hi again Adrian and thanks for your passion ;p
Sorry about insisting on that point - but I had to totally change my packaging to make my application deployable under 3.2.1:
What I did (a bit dirty IMHO):
1. pack my ejb-jar and the library-jars containing the classes of my mbeans in a sar file.
2. declaring a dependency on the ejb-modul (setting fixed jmx-name via jboss.xml descriptor in the ejb-jar) for each mbean
this alone would not help because:
As mentioned in my previous postings the main deployer deploys sar-files BEFORE EJBDeployer is up (due to the fact that EJBDeployer depends on other services that get deployed after my sar because sar files have highest priority). OK - this means the library-jars nested in my sar get deployed first - then the mbeans declared in jboss-service.xml are created and there it crashes because this mbeans reference ejb-interfaces which are in the ejb-jar, that is still on the waiting list for deployment since the EJBDeployer is not up yet.
OK - to fix this...
3. Extract the classes referenced from the mbeans from the ejb-jar and put it in a standalone jar and put it in the sar (dont duplicate it - remove these classes from the ejb-jar or you would get linkage error due to duplicate classes)
OK - now the sar deploys almost correctly - but during deployment of the entity beans I got errors because the datasource wasn't yet bound to jndi....
4. I added an additional dependency for the EJBDeployer on my jca-service.
Now everything deploys correctly.
The downside of this approach is, that I have to extract the ejb-interfaces from my ejb-jar - thats awfull! the ejb-jar would never deploy alone!
The underlying problem seems to be, that sar files get deployed too early (before needed Deployers are up) and that dependency declaration in mbeans dont delay the creation but only the start of the mbean. if the creation would be delayed it wouldn't be necessary to extract the ejb-interfaces from my ejb-jar ...
So long,
Manuel