-
1. Re: Deploying a custom archive in Jboss 7 to integrate into teiid
shawkins Jun 13, 2013 8:10 AM (in response to madhu.garimilla)This may be a fairly substancial undertaking. You can have a look at Teiid's utilization of the deployer framework to get an idea of how this could be done:
For AS 7.2/EAP 6.1: https://github.com/teiid/teiid/tree/master/jboss-integration/src/main/java/org/teiid/jboss
If you have the notion of a subsystem, such as a runtime framework that is is configurable and not just a custom archive, you'll need classes similar to: TeiidAdd, TeiidSubsystemParser, and TeiidSubsytemResourceDefinition/TeiidOperationHandler (for cli operations)
If you just want to handle the custom artifact, then see the simple handling for our custom translator jars in the Translator* classes. Primarily TranslatorStructureDeployer to detect translator deployments, and TranslatorDeployer
The VDB related classes have more complicated handling, such as setting up classpaths, but don't have anything related to embedded war files which you'd have to research futher.
Perhaps what you really want is something more like an ear format, but want some additional handling for Teiid.
Steve
-
2. Re: Deploying a custom archive in Jboss 7 to integrate into teiid
madhu.garimilla Jun 14, 2013 11:42 AM (in response to shawkins)Hi Steve, Thank you very much for the reply. This is the same thing that i am looking for. Almost all of my artifacts are teiid related and i shall be bundling them into a custom archive.
Inside my subsystem, I would like to delegate some of the deployment tasks to teiid such as Translator/module deployment, vdb deployment and tasks such as war deployment to jboss. Could you please help me with the following.
1. I would like to understand how the dependencies are handled between the deployment units. For example, deploying a module depends on deploying another module. Do we have any similar use cases handled in teiid sub system?
2. How is jboss handling the deployment task as an atomic operation, I see the deploy method inside DeploymentUnitProcessor mentions that either it gets successfully completes this operation or throws an exception and rollbacks all changes. Is jboss going to take care of this roll back automatically or we need to provide any implemention for this.
Thanks again for quick and detailed reply. It was really helpful
-
3. Re: Deploying a custom archive in Jboss 7 to integrate into teiid
shawkins Jun 14, 2013 12:01 PM (in response to madhu.garimilla)> 1. I would like to understand how the dependencies are handled between the deployment units. For example, deploying a module depends on deploying another module. Do we have any similar use cases handled in teiid sub system?
You'll want to differentiate between modules - which have their own dependency mechanism in the jar manifest or with the main.xml used in full module. And services, which is what the AS is managing at runtime that can have dependencies to modules. If you have a missing dependency to your module, attempting to use it should throw a ModuleLoadException. VDBDependencyDeployer shows how we build a classpath for use in the vdb based upon the lib property and any jars contained in the lib of the zip archive. This means that we are referencing already deployed modules and creating simple jar-based modules.
> 2. How is jboss handling the deployment task as an atomic operation, I see the deploy method inside DeploymentUnitProcessor mentions that either it gets successfully completes this operation or throws an exception and rollbacks all changes. Is jboss going to take care of this roll back automatically or we need to provide any implemention for this.
As long as all of your actions are through the deployer framework it seems like AS should handle it, but Ramesh or the AS team would be best to ask about the specifics. If you are creating files and taking other actions in your deployment it seems like you'll be responsible for cleanup.
-
4. Re: Deploying a custom archive in Jboss 7 to integrate into teiid
rareddy Jun 18, 2013 8:03 AM (in response to shawkins)Cleanup usually means termination of related services that were activated in that deployment cycle. Just like how you add code "add" step, you need to add code for "remove" step.