> Currently, remote deployment is not supported by the ant tasks. > The only way to do currently that is to start a servicemix console > on the same server, because the console accepts uploads and will > be able to point the container to a local file. > > The only way using JMX would be to add a method accepting a byte[] > parameter which would be the content of the JBI artifact to deploy, or > creating an management endpoint on the JBI bus (using an attachment > for the JBI archetype). Not sure what's the best way. I was thinking about this alternative, as well. There could be a provider service that accepts calls having an SA attachment. It could then obtain this attachment and physically place it in the deployment dir.
In that way, one could use the same access control mechanism as for the rest of the service invocations. Another advantage would be that through the different binding components, the functionality would be available in more than just Java. However, I'd need to access some JBIContainer properties, such as the deployment directory. I assume that the best way to obtain internals about the JBI container would be to use the client API (http://incubator.apache.org/servicemix/client-api.html). I could then use the following code: >> ... DeliveryChannelImpl dci = (DeliveryChannelImpl) defaultSMClientInstance.getDeliveryChannel(); JBIContainer container = dci.getContainer(); ... String deploymentDirPath = container.getDeploymentDirPath(); ... << However, this hack seems quite (if not: too) dirty. Is there a more elegant solution? Thanks in advance, Ciao, Philipp > -----Mensaje original----- > De: Guillaume Nodet [mailto:[EMAIL PROTECTED] > Enviado el: lunes, 19 de marzo de 2007 16:01 > Para: [email protected] > Asunto: Re: Remote deployment of service assemblies > Importancia: Baja > > Currently, remote deployment is not supported by the ant tasks. > The only way to do currently that is to start a servicemix console > on the same server, because the console accepts uploads and will > be able to point the container to a local file. > > The only way using JMX would be to add a method accepting a byte[] > parameter which would be the content of the JBI artifact to deploy, or > creating an management endpoint on the JBI bus (using an attachment > for the JBI archetype). Not sure what's the best way. > > On 3/19/07, Rossmanith, Philipp <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > In our project, we have several client applications that need to deploy > > and undeploy service assemblies at runtime. The majority of them are > > written in Java, others not. > > > > It seems that remote administration is something that would best be > > handled by the administration Ant tasks. > > > > Ant tasks can be called from Java code: > > http://ant.apache.org/manual/antexternal.html > > > > Now I was wondering: > > If I need to do remote un-/deployment from within client applications, > > is there already some existing API for doing that? Perhaps an Endpoint > > accepting service assemblies? If not, would some Java-wrapper around the > > aforementioned Ant tasks be a viable alternative? > > > > Thanks in advance, > > Ciao, > > Philipp > > > > This e-mail may contain confidential or privileged information. Any > > unauthorised > > copying, use or distribution of this information is strictly prohibited. > > > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Architect, LogicBlaze (http://www.logicblaze.com/) > Blog: http://gnodet.blogspot.com/ This e-mail may contain confidential or privileged information. Any unauthorised copying, use or distribution of this information is strictly prohibited.
