openbus-cvs-commits Mailing List for Openbus (Page 2)
Status: Alpha
Brought to you by:
esancho
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(166) |
May
(99) |
Jun
(135) |
Jul
(65) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Esteban S. <es...@us...> - 2005-07-19 01:09:24
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/javax/jbi/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1126/src/java/javax/jbi/component Removed Files: Component.java Bootstrap.java ComponentLifeCycle.java MBeanNames.java InstallationContext.java ServiceUnitManager.java ComponentContext.java Log Message: Removing JBI spec code and adding dependency to external jbi jar (stored in our maven repo) --- ServiceUnitManager.java DELETED --- --- MBeanNames.java DELETED --- --- Bootstrap.java DELETED --- --- Component.java DELETED --- --- ComponentLifeCycle.java DELETED --- --- InstallationContext.java DELETED --- --- ComponentContext.java DELETED --- |
From: Diego E. <er...@us...> - 2005-07-17 21:19:38
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26340/src/test/org/openbus/jbi/messaging/examples/inout Modified Files: ConsumerEngine.java Added Files: ConsumerEngineDefinition.wsdl Removed Files: ConsumerEngineDefinition.xml Log Message: changed WSDL xml file extension to wsdl --- NEW FILE: ConsumerEngineDefinition.wsdl --- <?xml version="1.0"?> <definitions name="service1" targetNamespace="http://abc.com/services" xmlns:tns="http://abc.com/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <message name="getQuoteInput"> <part name="symbol" type="xsd:string"/> </message> <message name="getQuoteOutput"> <part name="quote" type="xsd:float"/> </message> <portType name="GetQuote"> <operation name="updateStatus"> <input message="tns:getQuoteInput"/> <output message="tns:getQuoteOutput"/> </operation> </portType> <binding name="GetQuoteConsumerEngine" type="tns:GetQuote"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="updateStatus"> <soap:operation soapAction=""/> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </output> </operation> </binding> <service name="service2"> <port name="StockQuotePort" binding="tns:GetQuoteConsumerEngine"> <soap:address location="http://www.fremantle.org/soap/servlet/rpcrouter"/> </port> </service> </definitions> Index: ConsumerEngine.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inout/ConsumerEngine.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConsumerEngine.java 21 Jun 2005 03:12:19 -0000 1.2 --- ConsumerEngine.java 17 Jul 2005 21:19:28 -0000 1.3 *************** *** 132,136 **** && ref.getEndpointName().equals(ENDPOINT2)) { InputStream is = getClass().getResourceAsStream( ! "ConsumerEngineDefinition.xml"); DOMParser parser = new DOMParser(); try { --- 132,136 ---- && ref.getEndpointName().equals(ENDPOINT2)) { InputStream is = getClass().getResourceAsStream( ! "ConsumerEngineDefinition.wsdl"); DOMParser parser = new DOMParser(); try { --- ConsumerEngineDefinition.xml DELETED --- |
From: Diego E. <er...@us...> - 2005-07-17 21:19:37
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26340/src/test/org/openbus/jbi/messaging/examples/inonly Modified Files: SoapBinding.java Added Files: SoapBindingDefinition.wsdl Removed Files: SoapBindingDefinition.xml Log Message: changed WSDL xml file extension to wsdl Index: SoapBinding.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly/SoapBinding.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SoapBinding.java 10 Jul 2005 18:31:50 -0000 1.6 --- SoapBinding.java 17 Jul 2005 21:19:28 -0000 1.7 *************** *** 1,6 **** package org.openbus.jbi.messaging.examples.inonly; - import java.io.FileNotFoundException; - import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; --- 1,4 ---- *************** *** 16,28 **** import javax.xml.namespace.QName; import javax.xml.parsers.ParserConfigurationException; - import javax.xml.transform.Result; - import javax.xml.transform.Source; - import javax.xml.transform.Transformer; - import javax.xml.transform.TransformerConfigurationException; - import javax.xml.transform.TransformerException; - import javax.xml.transform.TransformerFactory; - import javax.xml.transform.TransformerFactoryConfigurationError; - import javax.xml.transform.dom.DOMSource; - import javax.xml.transform.stream.StreamResult; import junit.framework.Assert; --- 14,17 ---- *************** *** 183,187 **** InputStream is = getClass().getResourceAsStream( ! "SoapBindingDefinition.xml"); DOMParser parser = new DOMParser(); try { --- 172,176 ---- InputStream is = getClass().getResourceAsStream( ! "SoapBindingDefinition.wsdl"); DOMParser parser = new DOMParser(); try { *************** *** 222,253 **** } ! public void writeDocument(Document doc, String filename) { ! Source source = new DOMSource(doc); ! // Prepare the output file ! // File file = new File("output.xml"); ! // System.out.println("File exists " + file.exists()); ! Result rs = null; ! try { ! rs = new StreamResult(new FileOutputStream(filename)); ! } catch (FileNotFoundException e1) { ! // TODO Auto-generated catch block ! e1.printStackTrace(); ! } ! // Write the DOM document to the file ! Transformer xformer; ! ! try { ! xformer = TransformerFactory.newInstance().newTransformer(); ! xformer.transform(source, rs); ! } catch (TransformerConfigurationException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } catch (TransformerFactoryConfigurationError e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } catch (TransformerException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); ! } ! } } --- 211,242 ---- } ! // public void writeDocument(Document doc, String filename) { ! // Source source = new DOMSource(doc); ! // // Prepare the output file ! // // File file = new File("output.xml"); ! // // System.out.println("File exists " + file.exists()); ! // Result rs = null; ! // try { ! // rs = new StreamResult(new FileOutputStream(filename)); ! // } catch (FileNotFoundException e1) { ! // // TODO Auto-generated catch block ! // e1.printStackTrace(); ! // } ! // // Write the DOM document to the file ! // Transformer xformer; ! // ! // try { ! // xformer = TransformerFactory.newInstance().newTransformer(); ! // xformer.transform(source, rs); ! // } catch (TransformerConfigurationException e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } catch (TransformerFactoryConfigurationError e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } catch (TransformerException e) { ! // // TODO Auto-generated catch block ! // e.printStackTrace(); ! // } ! // } } --- NEW FILE: SoapBindingDefinition.wsdl --- <?xml version="1.0"?> <definitions name="service1" targetNamespace="http://abc.com/services" xmlns:tns="http://abc.com/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <message name="getQuoteInput"> <part name="symbol" type="xsd:string"/> </message> <message name="getQuoteOutput"> <part name="quote" type="xsd:float"/> </message> <portType name="GetQuote"> <operation name="updateStatus"> <input message="tns:getQuoteInput"/> <output message="tns:getQuoteOutput"/> </operation> </portType> <binding name="GetQuoteSoapBinding" type="tns:GetQuote"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="updateStatus"> <soap:operation soapAction=""/> <input> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </input> <output> <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xmltoday-delayed-quotes"/> </output> </operation> </binding> <service name="service1"> <port name="StockQuotePort" binding="tns:GetQuoteSoapBinding"> <soap:address location="http://www.fremantle.org/soap/servlet/rpcrouter"/> </port> </service> </definitions> --- SoapBindingDefinition.xml DELETED --- |
From: Diego E. <er...@us...> - 2005-07-15 00:24:34
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/javax/jbi/component In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23553/src/java/javax/jbi/component Removed Files: LifeCycleMBean.java Log Message: Updated specification --- LifeCycleMBean.java DELETED --- |
From: Diego E. <er...@us...> - 2005-07-15 00:23:25
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23283/src/java/org/openbus/jbi/framework Added Files: OpenBusJBIEnvironment.java Log Message: Services Environment --- NEW FILE: OpenBusJBIEnvironment.java --- package org.openbus.jbi.framework; import org.openbus.jbi.messaging.NMRService; public interface OpenBusJBIEnvironment { void setNMRService(NMRService nmr); NMRService getNMRService(); } |
From: Diego E. <er...@us...> - 2005-07-15 00:22:39
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/javax/jbi/management In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23170/src/java/javax/jbi/management Added Files: ComponentLifeCycleMBean.java Log Message: Updated specification --- NEW FILE: ComponentLifeCycleMBean.java --- package javax.jbi.management; import javax.management.ObjectName; public interface ComponentLifeCycleMBean extends LifeCycleMBean { ObjectName getExtensionMBean(); } |
From: Diego E. <er...@us...> - 2005-07-14 23:11:09
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/loader/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/java/org/openbus/jbi/loader/impl Modified Files: DefaultClassLoaderFactoryImpl.java Log Message: Component Repository added to JBIRegistry Index: DefaultClassLoaderFactoryImpl.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/loader/impl/DefaultClassLoaderFactoryImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DefaultClassLoaderFactoryImpl.java 2 Jul 2005 23:04:26 -0000 1.1 --- DefaultClassLoaderFactoryImpl.java 14 Jul 2005 23:11:00 -0000 1.2 *************** *** 29,33 **** import org.openbus.jbi.descriptor.ComponentDesc; import org.openbus.jbi.descriptor.SharedLibraryDesc; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; --- 29,33 ---- import org.openbus.jbi.descriptor.ComponentDesc; import org.openbus.jbi.descriptor.SharedLibraryDesc; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; *************** *** 64,68 **** } ! public ClassLoader getComponentClassLoader(Component component_) throws FrameworkException { ClassLoader loader = (ClassLoader) componentLoaders.get(component_); --- 64,68 ---- } ! public ClassLoader getComponentClassLoader(ComponentConfig component_) throws FrameworkException { ClassLoader loader = (ClassLoader) componentLoaders.get(component_); *************** *** 136,140 **** } ! public ClassLoader getBootstrapClassLoader(Component component_) throws FrameworkException { ClassLoader loader = (ClassLoader) bootstrapLoaders.get(component_); --- 136,140 ---- } ! public ClassLoader getBootstrapClassLoader(ComponentConfig component_) throws FrameworkException { ClassLoader loader = (ClassLoader) bootstrapLoaders.get(component_); |
From: Diego E. <er...@us...> - 2005-07-14 23:11:09
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/loader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/java/org/openbus/jbi/loader Modified Files: ClassLoaderFactory.java Log Message: Component Repository added to JBIRegistry Index: ClassLoaderFactory.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/loader/ClassLoaderFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ClassLoaderFactory.java 2 Jul 2005 23:04:27 -0000 1.1 --- ClassLoaderFactory.java 14 Jul 2005 23:11:00 -0000 1.2 *************** *** 16,20 **** package org.openbus.jbi.loader; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; --- 16,20 ---- package org.openbus.jbi.loader; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; *************** *** 25,32 **** */ public interface ClassLoaderFactory { ! ClassLoader getComponentClassLoader(Component component_) throws FrameworkException; ! ClassLoader getBootstrapClassLoader(Component component_) throws FrameworkException; } \ No newline at end of file --- 25,32 ---- */ public interface ClassLoaderFactory { ! ClassLoader getComponentClassLoader(ComponentConfig component_) throws FrameworkException; ! ClassLoader getBootstrapClassLoader(ComponentConfig component_) throws FrameworkException; } \ No newline at end of file |
From: Diego E. <er...@us...> - 2005-07-14 23:11:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/test/org/openbus/jbi/messaging Added Files: AllTests.java Log Message: Component Repository added to JBIRegistry --- NEW FILE: AllTests.java --- package org.openbus.jbi.messaging; import junit.framework.Test; import junit.framework.TestSuite; public class AllTests { public static Test suite() { TestSuite suite = new TestSuite("Test for org.openbus.jbi.messaging"); //$JUnit-BEGIN$ suite.addTestSuite(DeliveryChannelImplTest.class); suite.addTestSuite(SpecificationExamplesTest.class); suite.addTestSuite(NormalizedMessageImplTest.class); //$JUnit-END$ return suite; } } |
From: Diego E. <er...@us...> - 2005-07-14 23:11:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/java/org/openbus/jbi/framework/impl Modified Files: FileSystemRepositoryImpl.java HashmapJBIRegistryImpl.java Log Message: Component Repository added to JBIRegistry Index: HashmapJBIRegistryImpl.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework/impl/HashmapJBIRegistryImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HashmapJBIRegistryImpl.java 28 Jun 2005 03:02:32 -0000 1.2 --- HashmapJBIRegistryImpl.java 14 Jul 2005 23:10:59 -0000 1.3 *************** *** 24,32 **** import java.util.Iterator; import org.apache.commons.collections.collection.UnmodifiableCollection; import org.apache.commons.lang.SerializationUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; --- 24,34 ---- import java.util.Iterator; + import javax.jbi.component.Component; + import org.apache.commons.collections.collection.UnmodifiableCollection; import org.apache.commons.lang.SerializationUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; *************** *** 223,229 **** * @see org.openbus.jbi.framework.FrameworkRegistry#getComponent(java.lang.String) */ ! public Component getComponent(String componentName_) { synchronized (components) { ! return (Component) components.get(componentName_); } } --- 225,231 ---- * @see org.openbus.jbi.framework.FrameworkRegistry#getComponent(java.lang.String) */ ! public ComponentConfig getComponentConfig(String componentName_) { synchronized (components) { ! return (ComponentConfig) components.get(componentName_); } } *************** *** 233,237 **** } ! public void addComponent(Component component_) throws FrameworkException { if (isComponentInstalled(component_.getUniqueName())) { // @todo i18n --- 235,239 ---- } ! public void addComponent(ComponentConfig component_) throws FrameworkException { if (isComponentInstalled(component_.getUniqueName())) { // @todo i18n *************** *** 260,262 **** --- 262,269 ---- } + public Component getComponent(String component) { + // @todo implement + return null; + } + } \ No newline at end of file Index: FileSystemRepositoryImpl.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework/impl/FileSystemRepositoryImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FileSystemRepositoryImpl.java 28 Jun 2005 03:02:32 -0000 1.3 --- FileSystemRepositoryImpl.java 14 Jul 2005 23:10:59 -0000 1.4 *************** *** 27,31 **** import org.apache.commons.logging.LogFactory; import org.openbus.commons.util.ZipUtils; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; --- 27,31 ---- import org.apache.commons.logging.LogFactory; import org.openbus.commons.util.ZipUtils; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; *************** *** 143,147 **** } ! public String storeComponent(Component component_, String zipFile_) throws FrameworkException { if (isComponentStored(component_)) { --- 143,147 ---- } ! public String storeComponent(ComponentConfig component_, String zipFile_) throws FrameworkException { if (isComponentStored(component_)) { *************** *** 160,164 **** } ! public void removeComponent(Component component_) throws FrameworkException { try { File componentDir = new File(getComponentsPath(), component_ --- 160,164 ---- } ! public void removeComponent(ComponentConfig component_) throws FrameworkException { try { File componentDir = new File(getComponentsPath(), component_ *************** *** 171,175 **** } ! public boolean isComponentStored(Component component_) throws FrameworkException { File componentDir = new File(getComponentsPath(), component_ --- 171,175 ---- } ! public boolean isComponentStored(ComponentConfig component_) throws FrameworkException { File componentDir = new File(getComponentsPath(), component_ |
From: Diego E. <er...@us...> - 2005-07-14 23:11:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/java/org/openbus/jbi/installation/impl Modified Files: InstallationService.java Log Message: Component Repository added to JBIRegistry Index: InstallationService.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation/impl/InstallationService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InstallationService.java 13 Jul 2005 21:15:11 -0000 1.1 --- InstallationService.java 14 Jul 2005 23:10:59 -0000 1.2 *************** *** 29,33 **** import org.openbus.commons.transaction.JTAFactory; import org.openbus.jbi.descriptor.JBIDesc; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; --- 29,33 ---- import org.openbus.commons.transaction.JTAFactory; import org.openbus.jbi.descriptor.JBIDesc; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; *************** *** 120,124 **** for (Iterator i = components.iterator(); i.hasNext();) { ! Component comp = (Component) i.next(); if (comp.getDependencies().contains(library_)) { // @todo i18n --- 120,124 ---- for (Iterator i = components.iterator(); i.hasNext();) { ! ComponentConfig comp = (ComponentConfig) i.next(); if (comp.getDependencies().contains(library_)) { // @todo i18n *************** *** 212,216 **** } ! protected void abortComponentInstallation(Component component_) { } --- 212,216 ---- } ! protected void abortComponentInstallation(ComponentConfig component_) { } |
From: Diego E. <er...@us...> - 2005-07-14 23:11:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/framework/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/test/org/openbus/jbi/framework/impl Modified Files: HashmapJBIRegistryImplTest.java FileSystemRepositoryImplTest.java Log Message: Component Repository added to JBIRegistry Index: FileSystemRepositoryImplTest.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/framework/impl/FileSystemRepositoryImplTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileSystemRepositoryImplTest.java 28 Jun 2005 03:02:31 -0000 1.2 --- FileSystemRepositoryImplTest.java 14 Jul 2005 23:10:59 -0000 1.3 *************** *** 22,26 **** import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.JBIRegistry; import org.openbus.jbi.framework.SharedLibrary; --- 22,26 ---- import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.JBIRegistry; import org.openbus.jbi.framework.SharedLibrary; *************** *** 56,60 **** reg.addSharedLibrary(lib1); // add a component ! Component comp1 = new Component(getComponentDescription("Comp 1")); reg.addComponent(comp1); repository.storeRegistry(reg); --- 56,60 ---- reg.addSharedLibrary(lib1); // add a component ! ComponentConfig comp1 = new ComponentConfig(getComponentDescription("Comp 1")); reg.addComponent(comp1); repository.storeRegistry(reg); *************** *** 86,90 **** "UTF-8"); log.debug("Zip name: " + zipName); ! Component comp1 = new Component(getComponentDescription("Comp 1")); File compRoot = new File(repository.getComponentsPath(), comp1 .getUniqueName()); --- 86,90 ---- "UTF-8"); log.debug("Zip name: " + zipName); ! ComponentConfig comp1 = new ComponentConfig(getComponentDescription("Comp 1")); File compRoot = new File(repository.getComponentsPath(), comp1 .getUniqueName()); Index: HashmapJBIRegistryImplTest.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/framework/impl/HashmapJBIRegistryImplTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HashmapJBIRegistryImplTest.java 28 Jun 2005 03:02:31 -0000 1.2 --- HashmapJBIRegistryImplTest.java 14 Jul 2005 23:10:59 -0000 1.3 *************** *** 18,22 **** import org.apache.commons.lang.SerializationUtils; import org.openbus.jbi.descriptor.SharedLibraryDesc; ! import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; --- 18,22 ---- import org.apache.commons.lang.SerializationUtils; import org.openbus.jbi.descriptor.SharedLibraryDesc; ! import org.openbus.jbi.framework.ComponentConfig; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; *************** *** 120,124 **** JBIRegistry reg = new HashmapJBIRegistryImpl(); // add 1st library ! Component comp1 = new Component(getComponentDescription("Comp 1")); reg.addComponent(comp1); assertEquals(1, reg.getComponents().size()); --- 120,124 ---- JBIRegistry reg = new HashmapJBIRegistryImpl(); // add 1st library ! ComponentConfig comp1 = new ComponentConfig(getComponentDescription("Comp 1")); reg.addComponent(comp1); assertEquals(1, reg.getComponents().size()); *************** *** 132,140 **** assertEquals(1, reg.getComponents().size()); // add 2nd comp ! Component comp2 = new Component(getComponentDescription("Comp 2")); reg.addComponent(comp2); assertEquals(2, reg.getComponents().size()); ! assertSame(comp1, reg.getComponent("Comp 1")); ! assertSame(comp2, reg.getComponent("Comp 2")); } catch (Exception e) { e.printStackTrace(); --- 132,140 ---- assertEquals(1, reg.getComponents().size()); // add 2nd comp ! ComponentConfig comp2 = new ComponentConfig(getComponentDescription("Comp 2")); reg.addComponent(comp2); assertEquals(2, reg.getComponents().size()); ! assertSame(comp1, reg.getComponentConfig("Comp 1")); ! assertSame(comp2, reg.getComponentConfig("Comp 2")); } catch (Exception e) { e.printStackTrace(); *************** *** 147,155 **** JBIRegistry reg = new HashmapJBIRegistryImpl(); // add 1st library ! Component comp1 = new Component(getComponentDescription("Comp 1")); reg.addComponent(comp1); assertEquals(1, reg.getComponents().size()); // add 2nd comp ! Component comp2 = new Component(getComponentDescription("Comp 2")); reg.addComponent(comp2); assertEquals(2, reg.getComponents().size()); --- 147,155 ---- JBIRegistry reg = new HashmapJBIRegistryImpl(); // add 1st library ! ComponentConfig comp1 = new ComponentConfig(getComponentDescription("Comp 1")); reg.addComponent(comp1); assertEquals(1, reg.getComponents().size()); // add 2nd comp ! ComponentConfig comp2 = new ComponentConfig(getComponentDescription("Comp 2")); reg.addComponent(comp2); assertEquals(2, reg.getComponents().size()); |
From: Diego E. <er...@us...> - 2005-07-14 23:11:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9846/src/java/org/openbus/jbi/framework Modified Files: JBIRegistry.java JBIRepository.java Added Files: ComponentConfig.java Removed Files: Component.java Log Message: Component Repository added to JBIRegistry --- Component.java DELETED --- --- NEW FILE: ComponentConfig.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.framework; import java.io.Serializable; import java.util.Collection; import org.openbus.jbi.descriptor.ComponentDesc; /** * * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public class ComponentConfig implements Serializable { private ComponentDesc descriptor; private String installRoot; public ComponentConfig(ComponentDesc descriptor_) { setDescriptor(descriptor_); } public String getUniqueName() { return getDescriptor().getIdentification().getName(); } public Collection getDependencies() { return getDescriptor().getRequiredLibraries(); } public ComponentDesc getDescriptor() { return descriptor; } public void setDescriptor(ComponentDesc descriptor_) { descriptor = descriptor_; } public String getInstallRoot() { return installRoot; } public void setInstallRoot(String installRoot_) { installRoot = installRoot_; } } Index: JBIRegistry.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework/JBIRegistry.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JBIRegistry.java 28 Jun 2005 03:02:30 -0000 1.2 --- JBIRegistry.java 14 Jul 2005 23:10:58 -0000 1.3 *************** *** 19,22 **** --- 19,24 ---- import java.util.Collection; + import javax.jbi.component.Component; + /** * *************** *** 59,63 **** boolean isComponentInstalled(String componentName_); ! Component getComponent(String componentName_); /** --- 61,65 ---- boolean isComponentInstalled(String componentName_); ! ComponentConfig getComponentConfig(String componentName_); /** *************** *** 67,72 **** Collection getComponents(); ! void addComponent(Component component_) throws FrameworkException; void removeComponent(String componentName_) throws FrameworkException; } \ No newline at end of file --- 69,77 ---- Collection getComponents(); ! void addComponent(ComponentConfig component_) throws FrameworkException; void removeComponent(String componentName_) throws FrameworkException; + + Component getComponent(String component); + } \ No newline at end of file Index: JBIRepository.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/framework/JBIRepository.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JBIRepository.java 28 Jun 2005 03:02:31 -0000 1.3 --- JBIRepository.java 14 Jul 2005 23:10:58 -0000 1.4 *************** *** 28,37 **** void removeRegistry() throws FrameworkException; ! String storeComponent(Component component_, String zipFile_) throws FrameworkException; ! void removeComponent(Component component_) throws FrameworkException; ! boolean isComponentStored(Component component_) throws FrameworkException; String storeSharedLibrary(SharedLibrary library_, String zipFile_) --- 28,37 ---- void removeRegistry() throws FrameworkException; ! String storeComponent(ComponentConfig component_, String zipFile_) throws FrameworkException; ! void removeComponent(ComponentConfig component_) throws FrameworkException; ! boolean isComponentStored(ComponentConfig component_) throws FrameworkException; String storeSharedLibrary(SharedLibrary library_, String zipFile_) |
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7593/src/test/org/openbus/jbi/installation Added Files: jbi-service-assembly-correct.xml DigesterPackageParserImplTest.java jbi-shared-library-correct.xml jbi-component-correct.xml Log Message: Fixing installation refactoring --- NEW FILE: jbi-service-assembly-correct.xml --- <?xml version="1.0" encoding="utf-8"?> <jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi"> <service-assembly> <identification> <name>example-deployment-1</name> <description>An example deployment of two service units</description> </identification> <service-unit> <identification> <name>SU-1</name> <description>service unit 1</description> </identification> <target> <artifacts-zip>su1-artifacts.zip</artifacts-zip> <component-name>bpel-engine-1</component-name> </target> </service-unit> <service-unit> <identification> <name>SU-2</name> <description>service unit 2</description> </identification> <target> <artifacts-zip>su2-artifacts.zip</artifacts-zip> <component-name>xslt-engine-1</component-name> </target> </service-unit> <connections> <connection> <consumer interface-name="iface1" endpoint-name="ep1"/> <provider service-name="serv1" endpoint-name="ep2"/> </connection> <connection> <consumer service-name="serv1" endpoint-name="ep3"/> <provider service-name="serv2" endpoint-name="ep4"/> </connection> </connections> </service-assembly> </jbi> --- NEW FILE: DigesterPackageParserImplTest.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation; import java.io.InputStream; import java.util.Collection; import java.util.Iterator; import junit.framework.TestCase; import org.openbus.jbi.descriptor.ClassNameDesc; import org.openbus.jbi.descriptor.ClassPathDesc; import org.openbus.jbi.descriptor.ComponentDesc; import org.openbus.jbi.descriptor.ConnectionDesc; import org.openbus.jbi.descriptor.ConsumerDesc; import org.openbus.jbi.descriptor.IdentificationDesc; import org.openbus.jbi.descriptor.JBIDesc; import org.openbus.jbi.descriptor.ProviderDesc; import org.openbus.jbi.descriptor.ServiceAssemblyDesc; import org.openbus.jbi.descriptor.ServiceUnitDesc; import org.openbus.jbi.descriptor.ShortLibraryDesc; import org.openbus.jbi.descriptor.SharedLibraryDesc; import org.openbus.jbi.descriptor.TargetDesc; import org.openbus.jbi.installation.impl.DigesterPackageParserImpl; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; /** * Test case for DigesterPackageParserImpl * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public class DigesterPackageParserImplTest extends TestCase { public void testParseCorrectComponentDescriptor() throws Exception { try { InputStream is = getClass().getResourceAsStream( "/org/openbus/jbi/installation/jbi-component-correct.xml"); DigesterPackageParserImpl parser = new DigesterPackageParserImpl(); // test JBI JBIDesc jbi = parser.getDescriptor(is); assertNotNull("JBI shouldn't be null", jbi); assertEquals("Version should be 1.0", 1.0f, jbi.getVersion(), 0.001f); assertNull("JBI shouldn't have a shared library", jbi .getSharedLibrary()); assertNull("JBI shouldn't have a service assembly", jbi .getServiceAssembly()); assertNull("JBI shouldn't have services", jbi.getServices()); // test component ComponentDesc comp = jbi.getComponent(); assertNotNull("JBI should have a component", comp); assertEquals("service-engine", comp.getType()); assertEquals("parent-first", comp .getComponentClassLoaderDelegation()); assertEquals("self-first", comp.getBootstrapClassLoaderDelegation()); // test identification IdentificationDesc id = comp.getIdentification(); assertNotNull("Component should have identification", id); assertEquals("example-engine-1", id.getName()); assertEquals("An example service engine", id.getDescription()); // test identification extensions Element node = id.getExtensions(); assertNotNull("Identification should have extensions", node); assertEquals("foo:TypeInfo", node.getTagName()); String nodeText = node.getFirstChild().getNodeValue(); assertNotNull("The element should have text", nodeText); assertEquals("BPEL:2.0:XQuery:1.0:XPath:2.0:XPath:1.0", nodeText .trim()); NamedNodeMap map = node.getAttributes(); assertNotNull("Fragment should have attributes", map); assertEquals("Should have a single attribute", 1, map.getLength()); Node partNumber = map.getNamedItem("part-number"); assertNotNull("Attribute part-number should exist", partNumber); assertEquals("012AB490-578F-114FAA", partNumber.getNodeValue()); // test component class name ClassNameDesc cn = comp.getComponentClassName(); assertNotNull("Component should have a class name", cn); assertEquals("foo", cn.getDescription()); assertEquals("com.foo.Engine1", cn.getName()); // test component class path ClassPathDesc cp = comp.getComponentClassPath(); assertNotNull("Component should have a class path", cp); Collection paths = cp.getPathElements(); assertNotNull("Class path should have path elements", paths); assertEquals("Should have 1 path element", 1, paths.size()); Iterator i = paths.iterator(); assertEquals("Engine1.jar", (String) i.next()); // test bootstrap class name String bCn = comp.getBootstrapClassName(); assertNotNull("Bootstrap should have a class name", bCn); assertEquals("com.foo.Engine1Bootstrap", bCn); // test bootstrap class path cp = comp.getBootstrapClassPath(); assertNotNull("Bootstrap should have a class path", cp); paths = cp.getPathElements(); assertNotNull("Bootstrap Class path should have path elements", paths); assertEquals("Should have 3 path element", 3, paths.size()); i = paths.iterator(); assertEquals("Engine1.jar", (String) i.next()); assertEquals("Engine2.jar", (String) i.next()); assertEquals("Engine3.jar", (String) i.next()); // test required libraries Collection libraries = comp.getRequiredLibraries(); assertNotNull("Component should have required libraries", libraries); assertEquals("Should have 2 libraries", 2, libraries.size()); i = libraries.iterator(); ShortLibraryDesc lib = (ShortLibraryDesc) i .next(); assertEquals("slib1", lib.getName()); assertEquals("1.2.3", lib.getVersion()); lib = (ShortLibraryDesc) i.next(); assertEquals("slib2", lib.getName()); assertEquals("4.5", lib.getVersion()); // test identification extensions Element data = comp.getInstallExtensionData(); assertNotNull("Component should have extensions", data); assertEquals("foo:Configuration", data.getTagName()); assertEquals("1.0", data.getAttribute("version")); Element pool = (Element) data .getElementsByTagName("foo:ThreadPool").item(0); assertNotNull("Element foo:ThreadPool should exist", pool); assertEquals("10", pool.getAttribute("size")); Element queue = (Element) data.getElementsByTagName("foo:Queue1") .item(0); assertNotNull("Element foo:Queue1 should exist", queue); assertEquals("50", queue.getAttribute("size")); } catch (Exception e) { e.printStackTrace(); assertTrue("Exception caught...", false); } } public void testParseCorrectServiceAssemblyDescriptor() { try { InputStream is = getClass() .getResourceAsStream( "/org/openbus/jbi/installation/jbi-service-assembly-correct.xml"); DigesterPackageParserImpl parser = new DigesterPackageParserImpl(); // test JBI JBIDesc jbi = parser.getDescriptor(is); assertNotNull("JBI shouldn't be null", jbi); assertEquals("Version should be 1.0", 1.0f, jbi.getVersion(), 0.001f); assertNull("JBI shouldn't have a shared library", jbi .getSharedLibrary()); assertNull("JBI shouldn't have a component", jbi.getComponent()); assertNull("JBI shouldn't have services", jbi.getServices()); // test service assembly ServiceAssemblyDesc sa = jbi.getServiceAssembly(); assertNotNull("JBI should have a service assembly", sa); // test identification IdentificationDesc id = sa.getIdentification(); assertNotNull("Service assembly should have identification", id); assertEquals("example-deployment-1", id.getName()); assertEquals("An example deployment of two service units", id .getDescription()); // test service units Collection units = sa.getServiceUnits(); assertNotNull("Service assembly should have service units", units); assertEquals("Should have 2 SU", 2, units.size()); Iterator i = units.iterator(); // test first service unit ServiceUnitDesc unit = (ServiceUnitDesc) i.next(); // test identification id = unit.getIdentification(); assertNotNull("Service unit should have identification", id); assertEquals("SU-1", id.getName()); assertEquals("service unit 1", id.getDescription()); // test target TargetDesc target = unit.getTarget(); assertNotNull("Service unit should have target", target); assertEquals("su1-artifacts.zip", target.getArtifactsZip()); assertEquals("bpel-engine-1", target.getComponentName()); // test second service unit unit = (ServiceUnitDesc) i.next(); // test identification id = unit.getIdentification(); assertNotNull("Service unit should have identification", id); assertEquals("SU-2", id.getName()); assertEquals("service unit 2", id.getDescription()); // test target target = unit.getTarget(); assertNotNull("Service unit should have target", target); assertEquals("su2-artifacts.zip", target.getArtifactsZip()); assertEquals("xslt-engine-1", target.getComponentName()); // test connections Collection connections = sa.getConnections(); assertNotNull("Service assembly should have connections", connections); assertEquals("Should have 2 connections", 2, connections.size()); i = connections.iterator(); // test first connection ConnectionDesc conn = (ConnectionDesc) i.next(); ConsumerDesc consumer = conn.getConsumer(); assertNotNull("Connection should have consumer", consumer); assertEquals("iface1", consumer.getInterfaceName()); assertEquals("ep1", consumer.getEndpointName()); ProviderDesc provider= conn.getProvider(); assertNotNull("Connection should have provider", provider); assertEquals("serv1", provider.getServiceName()); assertEquals("ep2", provider.getEndpointName()); // test second connection conn = (ConnectionDesc) i.next(); consumer = conn.getConsumer(); assertNotNull("Connection should have consumer", consumer); assertEquals("serv1", consumer.getServiceName()); assertEquals("ep3", consumer.getEndpointName()); provider= conn.getProvider(); assertNotNull("Connection should have provider", provider); assertEquals("serv2", provider.getServiceName()); assertEquals("ep4", provider.getEndpointName()); } catch (Exception e) { e.printStackTrace(); assertTrue("Exception caught...", false); } } public void testParseCorrectSharedLibraryDescriptor() { try { InputStream is = getClass() .getResourceAsStream( "/org/openbus/jbi/installation/jbi-shared-library-correct.xml"); DigesterPackageParserImpl parser = new DigesterPackageParserImpl(); // test JBI JBIDesc jbi = parser.getDescriptor(is); assertNotNull("JBI shouldn't be null", jbi); assertEquals("Version should be 1.0", 1.0f, jbi.getVersion(), 0.001f); assertNull("JBI shouldn't have a service assembly", jbi .getServiceAssembly()); assertNull("JBI shouldn't have a component", jbi.getComponent()); assertNull("JBI shouldn't have services", jbi.getServices()); // test shared library SharedLibraryDesc sl = jbi.getSharedLibrary(); assertNotNull("JBI should have a shared library", sl); // test identification IdentificationDesc id = sl.getIdentification(); assertNotNull("Service assembly should have identification", id); assertEquals("example-library-1", id.getName()); assertEquals("An example shared library", id .getDescription()); // test bootstrap class path ClassPathDesc cp = sl.getClassPath(); assertNotNull("Shared library should have a class path", cp); Collection paths = cp.getPathElements(); assertNotNull("Class path should have path elements", paths); assertEquals("Should have 3 path element", 3, paths.size()); Iterator i = paths.iterator(); assertEquals("lib1.jar", (String) i.next()); assertEquals("lib2.jar", (String) i.next()); assertEquals("lib3.jar", (String) i.next()); } catch (Exception e) { e.printStackTrace(); assertTrue("Exception caught...", false); } } } --- NEW FILE: jbi-component-correct.xml --- <?xml version="1.0" encoding="utf-8"?> <jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi" xmlns:foo="http://www.foo.com/ns/bar"> <component type="service-engine" component-class-loader-delegation="parent-first" bootstrap-class-loader-delegation="self-first"> <identification> <name>example-engine-1</name> <description>An example service engine</description> <foo:TypeInfo part-number="012AB490-578F-114FAA"> BPEL:2.0:XQuery:1.0:XPath:2.0:XPath:1.0 </foo:TypeInfo> </identification> <component-class-name description="foo"> com.foo.Engine1</component-class-name> <component-class-path> <path-element>Engine1.jar</path-element> </component-class-path> <bootstrap-class-name>com.foo.Engine1Bootstrap</bootstrap-class-name> <bootstrap-class-path> <path-element>Engine1.jar</path-element> <path-element>Engine2.jar</path-element> <path-element>Engine3.jar</path-element> </bootstrap-class-path> <shared-library version="1.2.3">slib1</shared-library> <shared-library version="4.5">slib2</shared-library> <foo:Configuration version="1.0"> <foo:ThreadPool size="10"/> <foo:Queue1 size="50"/> </foo:Configuration> </component> </jbi> --- NEW FILE: jbi-shared-library-correct.xml --- <?xml version="1.0" encoding="utf-8"?> <jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi"> <shared-library version="3.4" class-loader-delegation="parent-first"> <identification> <name>example-library-1</name> <description>An example shared library</description> </identification> <shared-library-class-path> <path-element>lib1.jar</path-element> <path-element>lib2.jar</path-element> <path-element>lib3.jar</path-element> </shared-library-class-path> </shared-library> </jbi> |
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7593/src/test/org/openbus/jbi/install Removed Files: jbi-component-correct.xml jbi-shared-library-correct.xml DigesterPackageParserImplTest.java jbi-service-assembly-correct.xml Log Message: Fixing installation refactoring --- jbi-service-assembly-correct.xml DELETED --- --- DigesterPackageParserImplTest.java DELETED --- --- jbi-component-correct.xml DELETED --- --- jbi-shared-library-correct.xml DELETED --- |
From: Esteban S. <es...@us...> - 2005-07-14 23:00:24
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/conf/digester In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7593/src/conf/digester Modified Files: shared-library-rules.xml component-rules.xml Log Message: Fixing installation refactoring Index: component-rules.xml =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/conf/digester/component-rules.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** component-rules.xml 9 Jun 2005 00:42:57 -0000 1.1 --- component-rules.xml 14 Jul 2005 23:00:14 -0000 1.2 *************** *** 27,31 **** <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.install.impl.IdentificationExtensionsRulesSource"/> </pattern> <!-- handling the component-class-name element --> --- 27,31 ---- <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.installation.impl.IdentificationExtensionsRulesSource"/> </pattern> <!-- handling the component-class-name element --> *************** *** 71,74 **** <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.install.impl.ComponentExtensionsRulesSource"/> </digester-rules> \ No newline at end of file --- 71,74 ---- <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.installation.impl.ComponentExtensionsRulesSource"/> </digester-rules> \ No newline at end of file Index: shared-library-rules.xml =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/conf/digester/shared-library-rules.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** shared-library-rules.xml 9 Jun 2005 00:42:57 -0000 1.1 --- shared-library-rules.xml 14 Jul 2005 23:00:14 -0000 1.2 *************** *** 25,29 **** <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.install.impl.IdentificationExtensionsRulesSource"/> </pattern> <!-- handling the shared-library-class-path element --> --- 25,29 ---- <!-- Handling the indentification extensions as DOM element (MAMADERA) --> <include ! class="org.openbus.jbi.installation.impl.IdentificationExtensionsRulesSource"/> </pattern> <!-- handling the shared-library-class-path element --> |
From: Esteban S. <es...@us...> - 2005-07-14 23:00:05
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7522/src/test/org/openbus/jbi/installation Log Message: Directory /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/installation added to the repository |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:22
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/install/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27941/src/java/org/openbus/jbi/install/impl Removed Files: DigesterPackageParserImpl.java ComponentExtensionsRulesSource.java DefaultJBIInstallerImpl.java ClassLoaderHelper.java IdentificationExtensionsRulesSource.java AbstractPackageParser.java Log Message: Refactoring installation code --- IdentificationExtensionsRulesSource.java DELETED --- --- DefaultJBIInstallerImpl.java DELETED --- --- ComponentExtensionsRulesSource.java DELETED --- --- AbstractPackageParser.java DELETED --- --- ClassLoaderHelper.java DELETED --- --- DigesterPackageParserImpl.java DELETED --- |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:22
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27941/src/java/org/openbus/jbi/installation Added Files: InstallerFactory.java InstallationException.java PackageParser.java Log Message: Refactoring installation code --- NEW FILE: PackageParser.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation; import java.util.zip.ZipFile; import org.openbus.jbi.descriptor.JBIDesc; /** * This interface is responsible of all the operations related to the * installation or deployment package. * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public interface PackageParser { /** * Reads the jbi.xml file contents from <code>package_</code> and returns * a JBIDescriptor representing it. * * @param package_ * The zip file with the package contents * * @return A new instance of JBIDescriptor representing the jbi.xml file * contents. * @throws InstallationException * If any error occurs while parsing the descriptor */ JBIDesc getDescriptor(ZipFile package_) throws InstallationException; } --- NEW FILE: InstallerFactory.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation; import java.awt.Component; import javax.jbi.management.InstallerMBean; /** * * * @author <a href="mailto:es...@op...">Esteban Sancho</a> */ public interface InstallerFactory { InstallerMBean getInstaller(Component component_); } --- NEW FILE: InstallationException.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation; import org.openbus.commons.exceptions.OpenbusException; /** * * * @author <a href="mailto:es...@op...">Esteban Sancho</a> */ public class InstallationException extends OpenbusException { /** * */ public InstallationException() { super(); // @todo Auto-generated constructor stub } /** * @param arg0 */ public InstallationException(String arg0) { super(arg0); // @todo Auto-generated constructor stub } /** * @param arg0 * @param arg1 */ public InstallationException(String arg0, Throwable arg1) { super(arg0, arg1); // @todo Auto-generated constructor stub } /** * @param arg0 */ public InstallationException(Throwable arg0) { super(arg0); // @todo Auto-generated constructor stub } } |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:21
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27941/src/java/org/openbus/jbi/install Removed Files: JBIInstaller.java PackageParser.java InstallationException.java Log Message: Refactoring installation code --- PackageParser.java DELETED --- --- InstallationException.java DELETED --- --- JBIInstaller.java DELETED --- |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:20
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27941/src/java/org/openbus/jbi/installation/impl Added Files: DigesterPackageParserImpl.java AbstractPackageParser.java InstallationService.java ComponentExtensionsRulesSource.java Installer.java IdentificationExtensionsRulesSource.java Log Message: Refactoring installation code --- NEW FILE: Installer.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import javax.jbi.JBIException; import javax.jbi.management.InstallerMBean; import javax.management.ObjectName; /** * OpenBus implementation of <code>InstallerMBean</code> management * interface. * * Created 04/05/2005 * @author Javier Storni * Revision: [Last rev id] at: [Last rev timestamp] * */ public class Installer implements InstallerMBean { public ObjectName getInstallerConfigurationMBean() throws JBIException { // TODO Auto-generated method stub return null; } public String getInstallRoot() { // TODO Auto-generated method stub return null; } public ObjectName install() throws JBIException { // TODO Auto-generated method stub return null; } public boolean isInstalled() { // TODO Auto-generated method stub return false; } public void uninstall() throws JBIException { // TODO Auto-generated method stub } } --- NEW FILE: IdentificationExtensionsRulesSource.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.digester.Digester; import org.apache.commons.digester.NodeCreateRule; import org.apache.commons.digester.xmlrules.DigesterRulesSource; import org.openbus.commons.exceptions.OpenbusRuntimeException; import org.w3c.dom.Node; /** * DigesterRulesSource implementation for the identification extensions. * * Used in component.xml file to configure digester. * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public class IdentificationExtensionsRulesSource implements DigesterRulesSource { private static String PATTERN = "(?!name|description)[^/]*"; public void getRules(Digester digester_) { try { NodeCreateRule nodeRule = new NodeCreateRule(Node.ELEMENT_NODE); digester_.addRule(PATTERN, nodeRule); digester_.addSetNext(PATTERN, "setExtensions", "org.w3c.dom.Element"); } catch (ParserConfigurationException pce) { throw new OpenbusRuntimeException(pce); } } } --- NEW FILE: ComponentExtensionsRulesSource.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.digester.Digester; import org.apache.commons.digester.NodeCreateRule; import org.apache.commons.digester.xmlrules.DigesterRulesSource; import org.openbus.commons.exceptions.OpenbusRuntimeException; import org.w3c.dom.Node; /** * DigesterRulesSource implementation for the identification extensions. * * Used in component.xml file to configure digester. * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public class ComponentExtensionsRulesSource implements DigesterRulesSource { private static String PATTERN = "(?!identification|" + "component-class-name|component-class-path|" + "bootstrap-class-name|bootstrap-class-path|" + "shared-library)[^/]*"; public void getRules(Digester digester_) { try { NodeCreateRule nodeRule = new NodeCreateRule(Node.ELEMENT_NODE); digester_.addRule(PATTERN, nodeRule); digester_.addSetNext(PATTERN, "setInstallExtensionData", "org.w3c.dom.Element"); } catch (ParserConfigurationException pce) { throw new OpenbusRuntimeException(pce); } } } --- NEW FILE: AbstractPackageParser.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipException; import java.util.zip.ZipFile; import org.openbus.jbi.descriptor.JBIDesc; import org.openbus.jbi.installation.InstallationException; import org.openbus.jbi.installation.PackageParser; /** * This class serves as skeleton for PackageParser implementations. * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public abstract class AbstractPackageParser implements PackageParser { public JBIDesc getDescriptor(ZipFile package_) throws InstallationException { JBIDesc descriptor = null; try { ZipEntry descEntry = package_.getEntry("META-INF/jbi.xml"); if (descEntry == null) { // @todo i18n throw new InstallationException( "The package doesn't contain a descriptor"); } InputStream is = package_.getInputStream(descEntry); descriptor = getDescriptor(is); } catch (ZipException e) { // @todo add right message throw new InstallationException(e); } catch (IOException e) { // @todo add right message throw new InstallationException(e); } return descriptor; } public abstract JBIDesc getDescriptor(InputStream is) throws InstallationException; } --- NEW FILE: DigesterPackageParserImpl.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import java.io.InputStream; import org.apache.commons.digester.Digester; import org.apache.commons.digester.RegexRules; import org.apache.commons.digester.xmlrules.FromXmlRuleSet; import org.openbus.commons.digester.JavaRegexMatcher; import org.openbus.jbi.descriptor.JBIDesc; import org.openbus.jbi.installation.InstallationException; import org.xml.sax.InputSource; /** * This class implements the PackageParser interface using commons digester to * parse the jbi.xml file * * @author <a href="mailto:es...@op...">Esteban Sancho </a> */ public class DigesterPackageParserImpl extends AbstractPackageParser { private static final String RULES_XML_FILE = "/digester/jbi-rules.xml"; public JBIDesc getDescriptor(InputStream input_) throws InstallationException { if (input_ == null) { // @todo i18n throw new IllegalArgumentException("Null parameter input_"); } // return value JBIDesc descriptor = null; // Obtain the digester xml file from class-path InputStream is = getClass().getResourceAsStream(RULES_XML_FILE); if (is == null) { // @todo i18n message throw new InstallationException( "Couldn't find the digester xml file: " + RULES_XML_FILE); } FromXmlRuleSet ruleSet = new FromXmlRuleSet(new InputSource(is)); // Instantiate and configure digester Digester digester = new Digester(); // @todo point to the appropriate DTD and turn validation on digester.setValidating(false); // create custom regex matcher digester.setRules(new RegexRules(new JavaRegexMatcher())); digester.addRuleSet(ruleSet); // parse the file and catch exceptions try { descriptor = (JBIDesc) digester.parse(input_); } catch (Exception e) { // @todo throw i18n message throw new InstallationException("Problems parsing descriptor", e); } return descriptor; } } --- NEW FILE: InstallationService.java --- /* * Copyright 2001-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openbus.jbi.installation.impl; import java.io.IOException; import java.util.Collection; import java.util.Iterator; import java.util.zip.ZipFile; import javax.jbi.management.InstallationServiceMBean; import javax.management.ObjectName; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openbus.commons.transaction.JTAFactory; import org.openbus.jbi.descriptor.JBIDesc; import org.openbus.jbi.framework.Component; import org.openbus.jbi.framework.FrameworkException; import org.openbus.jbi.framework.JBIRegistry; import org.openbus.jbi.framework.JBIRepository; import org.openbus.jbi.framework.SharedLibrary; import org.openbus.jbi.installation.InstallationException; import org.openbus.jbi.installation.PackageParser; /** * OpenBus implementation of <code>InstallationServiceMBean</code> management * interface. * * Created 04/05/2005 * * @author Javier Storni Revision: [Last rev id] at: [Last rev timestamp] * */ public class InstallationService implements InstallationServiceMBean { private PackageParser parser; private JBIRepository repository; private JBIRegistry registry; private JTAFactory jtaFactory; private static Log log = LogFactory.getLog(InstallationServiceMBean.class); public void init() throws InstallationException { if (repository == null) { // @todo i18n throw new InstallationException("JBIRepository implementation " + "is not available"); } try { registry = repository.retrieveRegistry(); } catch (FrameworkException e) { // @todo i18n throw new InstallationException("Error on initialization", e); } } public void shutdown() throws InstallationException { } protected JBIDesc getDescriptor(String slZipURL_) throws InstallationException { JBIDesc descriptor = null; try { ZipFile zip = new ZipFile(slZipURL_); descriptor = getParser().getDescriptor(zip); } catch (IOException e) { // @todo i18n throw new InstallationException( "Unable to get descriptor from file " + slZipURL_, e); } return descriptor; } public String installSharedLibrary(String slZipURL_) { String libraryName = null; SharedLibrary lib = null; try { lib = new SharedLibrary(getDescriptor(slZipURL_).getSharedLibrary()); libraryName = lib.getUniqueName(); String libRoot = getRepository().storeSharedLibrary(lib, slZipURL_); lib.setInstallRoot(libRoot); lib.setStatus(SharedLibrary.STATUS_INSTALLED); getRegistry().addSharedLibrary(lib); getRepository().storeRegistry(getRegistry()); } catch (Exception e) { // @todo i18n log.error("Unable to install shared library " + libraryName, new InstallationException(e)); if (lib != null) { try { abortSharedLibraryInstallation(lib); } catch (FrameworkException fe) { // @todo i18n log.warn("Error aborting installation of library " + libraryName + ". System state could be inconsistent.", fe); } } } return libraryName; } protected void checkDependencies(SharedLibrary library_) throws InstallationException { Collection components = getRegistry().getComponents(); for (Iterator i = components.iterator(); i.hasNext();) { Component comp = (Component) i.next(); if (comp.getDependencies().contains(library_)) { // @todo i18n throw new InstallationException("Component " + comp.getUniqueName() + " depends on shared library " + library_.getUniqueName() + " with version " + library_.getVersion()); } } } public boolean uninstallSharedLibrary(String slName_) { boolean success = false; try { SharedLibrary lib = registry.getSharedLibrary(slName_); if (lib == null) { // @todo i18n throw new InstallationException( "Shared library not installed: " + slName_); } checkDependencies(lib); try { getRegistry().removeSharedLibrary(slName_); getRepository().removeSharedLibrary(lib); getRepository().storeRegistry(getRegistry()); success = true; } catch (Exception e) { // @todo i18n throw new InstallationException( "Unable to uninstall shared library " + slName_, e); } } catch (InstallationException e) { // @todo Auto-generated catch block e.printStackTrace(); } return success; } public ObjectName loadInstaller(String componentName_) { // @todo Auto-generated method stub return null; } public ObjectName loadNewInstaller(String installZipURL_) { // @todo Auto-generated method stub return null; } public boolean unloadInstaller(String componentName_, boolean isToBeDeleted_) { // @todo Auto-generated method stub return false; } public JTAFactory getJtaFactory() { return jtaFactory; } public void setJtaFactory(JTAFactory jtaFactory_) { jtaFactory = jtaFactory_; } public PackageParser getParser() { return parser; } public void setParser(PackageParser parser_) { parser = parser_; } public JBIRegistry getRegistry() { return registry; } public void setRepository(JBIRepository repository_) { repository = repository_; } public JBIRepository getRepository() { return repository; } protected void abortSharedLibraryInstallation(SharedLibrary library_) throws FrameworkException { getRegistry().removeSharedLibrary(library_.getUniqueName()); getRepository().removeSharedLibrary(library_); getRepository().storeRegistry(getRegistry()); } protected void abortComponentInstallation(Component component_) { } } |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:20
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/management In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27941/src/java/org/openbus/jbi/management Removed Files: InstallationService.java Installer.java Log Message: Refactoring installation code --- Installer.java DELETED --- --- InstallationService.java DELETED --- |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:11
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27856/src/java/org/openbus/jbi/installation Log Message: Directory /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation added to the repository |
From: Esteban S. <es...@us...> - 2005-07-13 21:15:08
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation/impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27856/src/java/org/openbus/jbi/installation/impl Log Message: Directory /cvsroot/openbus/Openbus/OpenbusJBI/src/java/org/openbus/jbi/installation/impl added to the repository |
From: Diego E. <er...@us...> - 2005-07-10 18:32:03
|
Update of /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6518/src/test/org/openbus/jbi/messaging/examples/inonly Modified Files: SoapBinding.java Log Message: added XMLUnit comparison Index: SoapBinding.java =================================================================== RCS file: /cvsroot/openbus/Openbus/OpenbusJBI/src/test/org/openbus/jbi/messaging/examples/inonly/SoapBinding.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SoapBinding.java 8 Jul 2005 01:54:22 -0000 1.5 --- SoapBinding.java 10 Jul 2005 18:31:50 -0000 1.6 *************** *** 15,18 **** --- 15,19 ---- import javax.jbi.servicedesc.ServiceEndpoint; import javax.xml.namespace.QName; + import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Result; import javax.xml.transform.Source; *************** *** 30,33 **** --- 31,35 ---- import org.apache.commons.logging.LogFactory; import org.apache.xerces.parsers.DOMParser; + import org.custommonkey.xmlunit.Diff; import org.openbus.commons.transform.SimpleSourceSerializer; import org.openbus.jbi.messaging.TestComponentSupport; *************** *** 130,137 **** String content = SimpleSourceSerializer.serializeXML(inMsg .getContent()); ! // TODO compare the XML content ! // Assert.assertEquals(ConsumerEngine.MESSAGE_CONTENT, content); } catch (IOException e) { ! log.error(e); } --- 132,143 ---- String content = SimpleSourceSerializer.serializeXML(inMsg .getContent()); ! Diff diff = new Diff(ConsumerEngine.MESSAGE_CONTENT, content); ! Assert.assertTrue(diff.identical()); ! } catch (SAXException e) { ! Assert.fail(); } catch (IOException e) { ! Assert.fail(); ! } catch (ParserConfigurationException e) { ! Assert.fail(); } |