[jbosstools-dev] Re: Deploying a .ds (or any resource)

Max Rydahl Andersen max.andersen at redhat.com
Wed Aug 8 19:04:11 EDT 2007


ok thanks rob.

Denis - i'm looking into this one and wondering why -ds.xml is put into 
the src folder ?

-ds.xml is not something that should go there - it's an independent 
resource. afaik - seamgen puts it in it's resources dir.

Any reason you put it there ?

for beta1 its ok - just wondering why ?

After beta1 we need to go through the various files and make sure they 
are put in a sustainable location - especially if we want to avoid too 
many differences between an EAR and WAR setup.

/max


> Here is some example code I've thrown together. The code below should 
> work, except that the publisher is *not* yet ready to handle it. 
> However, the APIs will work.
> 
>             // get a path somehow. you can also use resource. Look at 
> SingleDeployableFactory's static methods
>                    IPath p = new Path("/abc/1.txt");
> 
> // mark this path or resource deployable.
>                    SingleDeployableFactory.makeDeployable(p);
> 
> // get the actual module object from the factory
>                    IModule module = SingleDeployableFactory.findModule(p);
>                                      IServer s = someServer // wherever 
> you get your server from
> 
> // convert it to a DeployableServer instance
>                    Object o = 
> s.loadAdapter(DeployableServerBehavior.class, null);
> 
> // if its not null, the adaptation worked.
>                    if( o != null )
> 
> // custom API to deploy / publish only one module.                     
>    ((DeployableServerBehavior)o).publishOneModule(IServer.PUBLISH_FULL, 
> new IModule[] {module}, ServerBehaviourDelegate.ADDED, new 
> NullProgressMonitor());
> 
> 
> 
> 
> If there are any questions ask me. Again, the last step will not yet 
> work because the publisher is not ready to handle these, but the factory 
> should be up and running.
> 
> - Rob Stryker




More information about the jbosstools-dev mailing list