Hi, Need some help with auto-deploying service assemblies. Is there a proper doc somewhere, which I can refer to? This is what I tried. Structure of the xxx-sa.zip xxx-sa.zip |----------- META-IN |------------- jbi.xml |----------- xxx-su.zip |------------- component | |-----------------Xyz.class |------------- servicemix.xml
The class Xyz extends ComponentSupport and implements MessageExchangeListener. It works fine if I change the element <sm:serviceunit id="jbi"> to <sm:container id="jbi"> in the servicemix.xml and put it in the root dir of the new sample component that I have made. Would appreciate if anyone could help. Thanks Soumadeep Console output ============ INFO - ComponentMBeanImpl.init(184) | Initializing component: #SubscriptionManag er# INFO - DeploymentService.buildState(683) | Restoring service assemblies INFO - JBIContainer.init(508) | ServiceMix JBI Container (http://servicemix.org/ ) name: ServiceMix running version: 3.0-SNAPSHOT INFO - ComponentMBeanImpl.setInitialRunningState(335) | Setting running state fo r Component: servicemix-lwcontainer to Started INFO - ComponentMBeanImpl.init(184) | Initializing component: servicemix-lwconta iner INFO - AutoDeploymentService$2.run(504) | Directory: deploy: Archive changed: pr ocessing xxx-sa.zip ... INFO - AutoDeploymentService.updateArchive(264) | Components xyz are not in stalled yet - adding ServiceAssembly xxx-sa to pending list INFO - AutoDeploymentService$2.run(508) | Directory: deploy: Finished installati on of archive: xbroker-sa.zip JBI File: ====== <?xml version="1.0" encoding="UTF-8"?> <jbi xmlns="http://java.sun.com/xml/ns/jbi" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jbi C:\servicemix-test-file\jbi.xsd"> <service-assembly> <identification> <name>xxx-sa</name> <description>xxx-sa</description> </identification> <service-unit> <identification> <name>xxx-su</name> <description>xxx-su components</description> </identification> <target> <artifacts-zip>xxx-su.zip</artifacts-zip> <component-name>xyz</component-name> </target> </service-unit> </service-assembly> </jbi> Servicemix.xml ============= <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xbean.org/schemas/spring/1.0" xmlns:sm="http://servicemix.org/config/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:foo="http://servicemix.org/demo/"> <classpath> <location>.</location> </classpath> <!-- the JBI container --> <sm:serviceunit id="jbi"> <sm:activationSpecs> <!-- Create a http server binding on port 8912 and have it forward to the foo:stockQuote --> <sm:activationSpec componentName="httpReceiver" service="foo:httpBinding" destinationService="foo:xyz"> <sm:component> <bean class="org.apache.servicemix.components.http.HttpConnector"> <!-- <property name="host" value="localhost"/> --> <property name="host" value="localhost"/> <property name="port" value="8912"/> </bean> </sm:component> </sm:activationSpec> <!-- This just invokes another service --> <sm:activationSpec componentName="xyz" service="foo:xyz" destinationService="foo:stockQuote">> <sm:component> <bean class="component.Xyz"> </bean> </sm:component> </sm:activationSpec> <!-- This just invokes another service --> <sm:activationSpec componentName="stockQuote" service="foo:stockQuote"> <sm:component> <bean class="org.apache.servicemix.components.saaj.SaajBinding"> <property name="soapEndpoint"> <bean class="javax.xml.messaging.URLEndpoint"> <constructor-arg value="http://64.124.140.30/soap"/> </bean> </property> </bean> </sm:component> </sm:activationSpec> </sm:activationSpecs> </sm:serviceunit> </beans> servicemix.xml - for the root directory when used with auto-deploy/ ant task ======================================================= <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:sm="http://servicemix.apache.org/config/1.0"> <!-- the JBI container --> <sm:container id="jbi" useMBeanServer="true" createMBeanServer="true" installationDirPath="./install" deploymentDirPath="./deploy" monitorInstallationDirectory="true" dumpStats="true" statsInterval="10"> <sm:activationSpecs> </sm:activationSpecs> </sm:container> </beans>