The client api is new.
The aim is to remove the direct use of the DeploymentContext and MainDeployer
from the client side (including the clients running in the same JVM like the
profile service or embedded).
Its made up of two main components:
DeployerClient
This is intended as a client side front end to the main deployer.
The main deployer interface itself extends it to add functions that are
purely server side (currently this is only shutdown())
and are not relevant for client side usage.
NOTE 1) The incomplete deployment exception processing is now a method
on this api so we don't need to keep re-implementing in different callers
or figure out how to get a handle on the microcontainer
NOTE 2) There are methods to deploy a single deployment (think JSR88)
rather than the add, add, add, process() model of the url scanner.
However, this implementation of these is still pretty naive and needs completing,
particularly the incomplete checking for a single deployment.
Deployment
The deployment is a client side model of the deployment context.
It is NOT directly linked to the deployment context.
It is made up of two main components:
* predetermined attachments
* structure metadata
There are also deployment factories that help in making this task
simpler.
A typical usage would be something like:
| DeployerClient deployer = ...;
| VirtualFile vf = ...;
|
| // Create the deployment
| VFSDeploymentFactory factory = VFSDeploymentFactory.getInstance();
| VFSDeployment deployment = factory.createVFSDeployment(vf);
|
| // Add some metadata
| deployment.getPredeterminedManagedObjects().addAttachment(someMetaData);
|
| // Create a subcontext/sub deployment
| ContextInfo subcontext = factory.addContext(deployment, "sub.jar",
"META-INF");
| // Add metadata to the subcontext
| subcontext.getPredeterminedManagedObjects().addAttachment(otherMetaData);
|
| // Deploy it
| deployer.addDeployment(deployment);
| deployer.process();
| deployer.checkIncomplete();
|
The main things missing from the Deployment over the DeploymentContext are:
1) The DeploymentState. To get this you can DeployerClient.getDeploymentState(name);
2) The deployment types. I don't have a replacement for this yet, see below on profile
service changes
3) Deployment structure, i.e. the subdeployments and components
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058819#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...