-
1. Re: how to extend an already deployed application
alesj Oct 27, 2009 12:50 PM (in response to csabaszucs)"CsabaSzucs" wrote:
Is there any standard way/design pattern/solution to do this within JBoss?
With JBoss flat CL model this is very easy to achieve.
e.g. see how we track Deployers against DeployersImpl
--> JBOSS_HOME\server\default\conf\bootstrap\deployers.xml<!-- Accept any implementor of deployer --> <incallback method="addDeployer"/> <uncallback method="removeDeployer"/>
Simply create and register some ReportRepository service against MC
and then track any newly deployed Reports via MC's incallback mechanism.
- http://java.dzone.com/articles/a-look-inside-jboss-microconta-0 -
2. Re: how to extend an already deployed application
csabaszucs Oct 27, 2009 4:32 PM (in response to csabaszucs)Hello again,
Thanks a lot for your fast help!
I started to read the JBoss Microcontainer User Guide: a really interesting runtime/component/deployment environment!
One question: may we use all the stuff you adviced me in JBoss 4.x or only in JBoss 5.y? Currently we are using JBoss 4.x.
Thanks!
Csaba -
3. Re: how to extend an already deployed application
alesj Oct 27, 2009 4:41 PM (in response to csabaszucs)Only JBoss5.
You can also have a look at my MC demos project for more examples:
- http://anonsvn.jboss.org/repos/jbossas/projects/demos/microcontainer/trunk/
The whole project is fully Maven-ized,
so it's very simple to use it, play around, debug, ...
Once you grasp the concepts, you can easily apply them in JBoss5. -
4. Re: how to extend an already deployed application
csabaszucs Oct 28, 2009 3:23 AM (in response to csabaszucs)Hello Ales,
so then I ask it in another way: is there any facility to hook on deployment callbacks /be notified about new deployments of applications, beans etc./ on JBoss 4.x?
I think implementing a ReportRepository service is not a problem in JBoss4.x.
I am not sure that we are allowed to shift to JBoss5.y nowadays...
Thanks again!
Csaba -
5. Re: how to extend an already deployed application
alesj Oct 28, 2009 3:31 AM (in response to csabaszucs)"CsabaSzucs" wrote:
so then I ask it in another way: is there any facility to hook on deployment callbacks /be notified about new deployments of applications, beans etc./ on JBoss 4.x?
You can create your own deployer.
A deployer that would handle just particular type of deployments, matching on suffix.
e.g. my-new-report.rep or some-report.xml
Taking those services/beans from the deployment,
and handle them somehow - registering against ReportRegistry or whatever.
Try looking at the code for JBoss4.x, my spring-int module,
where I handle Spring specific deployments: .spring or -spring.xml. -
6. Re: how to extend an already deployed application
csabaszucs Nov 2, 2009 10:01 AM (in response to csabaszucs)Ales,
How shall I extend JBoss deployment logics?
Based upon JBoss deployment SPI side or directly based upon the classes of SubDeployerSupport and the others like in the implementation of XSLSubDeployer?
So shall I implement my custom deployer class with the extension of org.jboss.deployment classes or with the extension of org.jboss.deployers.spi.deployer classes?
Thanks!
Csaba -
7. Re: how to extend an already deployed application
alesj Nov 2, 2009 10:12 AM (in response to csabaszucs)It's been a while since I did 4.x deployers.
Like I said, try doing similar thing as I did for SpringDeployer.
If it was MC/AS5 I could help you a lot more. ;-)