I don't want to start smx in embedded mode, rather I want to use smx stand-alone. When running smx stand-alone, won't I run into classloader issues if I try to use these APIs which appear to be reliant on the embedded mode?
- Ron ----- Original Message ---- From: Freeman Fang <[EMAIL PROTECTED]> To: [email protected] Sent: Saturday, September 27, 2008 4:30:24 AM Subject: Re: What are the Best Practices for updating physical addresses/bindings when deploying on different environments/domains? Hi Ron, Actually we do have api to start servicemix container and install componets and deploy endpoints programatcally. The code for install cxf bc component and deploy cxf bc consumer endpoint looks like component = new CxfBcComponent(); jbi.activateComponent(component, "CxfBcComponent");//jbi is an started servicemix container instance CxfBcConsumer cxfBcConsumer = new CxfBcConsumer(); cxfBcConsumer.setTargetEndpoint("CalculatorPort"); cxfBcConsumer.setTargetService(new QName("http://apache.org/cxf/calculator", "CalculatorService")); cxfBcConsumer.setLocationURI("http://localhost:9000/CalculatorService/SoapPort"); component.addEndpoint(cxfBcConsumer); component.start(); Also, if you define the endpoint in xbean, you can load the bean and deploy the endpoint by means of component = new CxfSeComponent(); jbi.activateComponent(component, "CxfSeComponent"); //Deploy proxy SU component.getServiceUnitManager().deploy("proxy", getServiceUnitPath("provider")); component.getServiceUnitManager().init("proxy", getServiceUnitPath("provider")); component.getServiceUnitManager().start("proxy"); protected String getServiceUnitPath(String name) { URL url = getClass().getClassLoader().getResource("org/apache/servicemix/cxfbc/" + name + "/xbean.xml"); File path = new File(url.getFile()); path = path.getParentFile(); return path.getAbsolutePath(); } Is this what you want? Regards Freeman Ron Gavlin wrote: > Greetings, > > This is a good first step. > > Now, let's say I have lots of file poller endpoint definitions and would like > their definition to be even more dynamic. > > For example, I might want to use a web application to maintain their > definition in a database that is shared by all nodes in a cluster. > > What types of APIs are available to programatically "define", "deploy", and > "undeploy" a set of file poller endpoints? Would I need to programatically > construct a service-assembly archive that contains a file-su and then > programatically use JMX to deploy it? Or are there lower-level APIs that > allow me to bypass the need to explicitly construct an archive file? > > Thanks, > > - Ron > > > > > > ----- Original Message ---- > From: Freeman Fang <[EMAIL PROTECTED]> > To: [email protected] > Sent: Friday, September 26, 2008 10:47:16 PM > Subject: Re: What are the Best Practices for updating physical > addresses/bindings when deploying on different environments/domains? > > Hi, > > I believe there is an excellent answer in Lars's reccent blog [1], it's > the good solution for dynamically change something like address for > deployment time. > > [1]http://lhein.blogspot.com/2008/09/servicemix-and-flexible-endpoint.html > > Regards > Freeman > > CheffPJ wrote: > >> I have thankfully gotten over the hump in developing my first SA. Now I will >> be deploying it to a test server. >> >> What do best practices dictate as far as where/how I make updates that now >> point to different physical Queues, Web Services, etc. assuming all of the >> logic and schemas are not changing? >> >> Considering the case of a large organization with overly-specialized roles >> (the developer is not the builder who is not the administrator...), how can >> we stay within the various roles and responsibilities? The following are >> true: >> * The administrators have the relevant environment-specific information >> * Builds/Packaging ideally happen once and are re-used across several >> different environments/domains by making physical bindings configurable >> * Admins sometimes are not permitted to share binding information >> * Source code repos should contain dummy or "localhost" values >> >> More Specifically: >> >> 0. Am I just out of luck and have to alter the values at build-time? If >> so, I'm going to have to invest time and beer money in training admins. >> >> 1. If an SU contains "localhost" values at build and deployment, can we use >> JMX to alter the physical endpoints? If so, are those changes sticky? >> Also, are there any non-lazy lookups that occur at deployment time which >> will break? >> >> 2. Is there some kind of deployment context that can be hooked into in >> order to use variables/interpolation within the spring/xbean files? If so, >> can these values be changed at runtime and are they sticky? >> >> 3. Am I missing something obvious or not thinking outside the box as far as >> how to best use Maven/SVN for managing "branches" of configurations >> (assuming there isn't sensitive information that isn't allowed in SVN in the >> first place)? >> >> 3. For example, given an http-provider with a physical service endpoint of >> "localhost," what are my options as far as where (jmx, apis, wsdl, xbean, >> etc) and when (build-time, deploy-time, run-time, etc.) I can change that >> address? >> >> Thanks for this powerful tool, >> >> Pat McDonough >> >> > >
