Commit 31c18756 authored by Gwenael Cattez's avatar Gwenael Cattez

Add logging.properties file to all module

Add test to all subcomponent of common-homeautomation 
parent c86a3cfa
############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overridden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=INFO
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.ow2.frascati.level = INFO
org.ow2.frascati.assembly.factory.level = INFO
# org.ow2.frascati.assembly.factory.manager.level = OFF
# org.ow2.frascati.assembly.factory.manager.AssemblyFactoryManager.level = OFF
org.ow2.frascati.assembly.factory.processor.level = INFO
# org.ow2.frascati.assembly.factory.processor.ScaBindingProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaBindingScaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentPropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositePropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaPropertyTypeJavaProcessor.level = OFF
org.ow2.frascati.component.factory.level = INFO
org.ow2.frascati.component.factory.juliac.level = INFO
org.ow2.frascati.property.jaxb.level = INFO
org.ow2.frascati.binding.level = INFO
org.ow2.frascati.binding.factory.level = INFO
org.ow2.frascati.binding.jms.level = INFO
org.objectweb.fractal.bf.connectors.jms.level = INFO
org.ow2.frascati.implementation.level = INFO
org.ow2.frascati.implementation.bpel.level = INFO
org.ow2.frascati.implementation.bpel.easybpel.level = INFO
org.ow2.frascati.parser.level = INFO
org.ow2.frascati.tinfi.level = INFO
org.ow2.frascati.wsdl.level = INFO
com.ebmwebsourcing.level = INFO
com.sun.level = INFO
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="Zibase" targetNamespace="http://zibase.demo.frascati.ow2.org/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://zibase.demo.frascati.ow2.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://zibase.demo.frascati.ow2.org/" xmlns:tns="http://zibase.demo.frascati.ow2.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="invokeModule" type="tns:invokeModule"/>
<xsd:complexType name="invokeModule">
<xsd:sequence>
<xsd:element minOccurs="0" name="arg0" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg1" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg2" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg3" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="invokeModuleResponse" type="tns:invokeModuleResponse"/>
<xsd:complexType name="invokeModuleResponse">
<xsd:sequence>
<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="invokeModuleResponse">
<wsdl:part element="tns:invokeModuleResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="invokeModule">
<wsdl:part element="tns:invokeModule" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="ZibasePortType">
<wsdl:operation name="invokeModule">
<wsdl:input message="tns:invokeModule" name="invokeModule">
</wsdl:input>
<wsdl:output message="tns:invokeModuleResponse" name="invokeModuleResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ZibaseSoapBinding" type="tns:ZibasePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="invokeModule">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="invokeModule">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="invokeModuleResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Zibase">
<wsdl:port binding="tns:ZibaseSoapBinding" name="ZibasePort">
<soap:address location="http://localhost:9100/zibase/invoke"/>
</wsdl:port>
</wsdl:service>
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="Zibase" targetNamespace="http://zibase.demo.frascati.ow2.org/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://zibase.demo.frascati.ow2.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://zibase.demo.frascati.ow2.org/" xmlns:tns="http://zibase.demo.frascati.ow2.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="invokeModule" type="tns:invokeModule"/>
<xsd:complexType name="invokeModule">
<xsd:sequence>
<xsd:element minOccurs="0" name="arg0" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg1" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg2" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="arg3" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="invokeModuleResponse" type="tns:invokeModuleResponse"/>
<xsd:complexType name="invokeModuleResponse">
<xsd:sequence>
<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="invokeModuleResponse">
<wsdl:part element="tns:invokeModuleResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="invokeModule">
<wsdl:part element="tns:invokeModule" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="ZibasePortType">
<wsdl:operation name="invokeModule">
<wsdl:input message="tns:invokeModule" name="invokeModule">
</wsdl:input>
<wsdl:output message="tns:invokeModuleResponse" name="invokeModuleResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ZibaseSoapBinding" type="tns:ZibasePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="invokeModule">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="invokeModule">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="invokeModuleResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Zibase">
<wsdl:port binding="tns:ZibaseSoapBinding" name="ZibasePort">
<soap:address location="http://localhost:9100/zibase/invoke"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overridden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=INFO
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.ow2.frascati.level = INFO
org.ow2.frascati.assembly.factory.level = INFO
# org.ow2.frascati.assembly.factory.manager.level = OFF
# org.ow2.frascati.assembly.factory.manager.AssemblyFactoryManager.level = OFF
org.ow2.frascati.assembly.factory.processor.level = INFO
# org.ow2.frascati.assembly.factory.processor.ScaBindingProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaBindingScaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentPropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositePropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaPropertyTypeJavaProcessor.level = OFF
org.ow2.frascati.component.factory.level = INFO
org.ow2.frascati.component.factory.juliac.level = INFO
org.ow2.frascati.property.jaxb.level = INFO
org.ow2.frascati.binding.level = INFO
org.ow2.frascati.binding.factory.level = INFO
org.ow2.frascati.binding.jms.level = INFO
org.objectweb.fractal.bf.connectors.jms.level = INFO
org.ow2.frascati.implementation.level = INFO
org.ow2.frascati.implementation.bpel.level = INFO
org.ow2.frascati.implementation.bpel.easybpel.level = INFO
org.ow2.frascati.parser.level = INFO
org.ow2.frascati.tinfi.level = INFO
org.ow2.frascati.wsdl.level = INFO
com.ebmwebsourcing.level = INFO
com.sun.level = INFO
......@@ -40,11 +40,12 @@
</properties>
<dependencies>
<dependency>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>common-onoffdevice</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-ws</artifactId>
......@@ -54,6 +55,48 @@
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>common-homeautomation-interface</artifactId>
</dependency>
<!--Dependencies for module common-homeautomation-zibase deplyed during the test phase-->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>copy</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.ow2.frascati.demo</groupId>
<artifactId>common-homeautomation-zibase</artifactId>
<version>${project.version}</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
......@@ -27,8 +27,8 @@
<component name="light">
<property name="moduleID">A10</property>
<property name="protocolID">0</property>
<property name="moduleID">A6</property>
<property name="protocolID">6</property>
<property name="onText">turn on</property>
<property name="offText">turn off</property>
......@@ -41,11 +41,17 @@
<implementation.java class="org.ow2.frascati.demo.common.homeautomation.light.Light" />
<reference name="zibase">
<interface.wsdl interface="zibase.wsdl#wsdl.interface(ZibasePortType)"/>
<binding.ws uri="http://localhost:9100/zibase/invoke"
wsdlElement="http://zibase.demo.frascati.ow2.org/#wsdl.port(Zibase/ZibasePort)" />
<interface.wsdl interface="zibase.wsdl#wsdl.interface(ZibasePortType)" />
<binding.ws uri="http://localhost:9100/zibase/invoke"
wsdlElement="http://zibase.demo.frascati.ow2.org/#wsdl.port(Zibase/ZibasePort)" />
</reference>
<!-- <reference name="zibase"> -->
<!-- <interface.java interface="org.ow2.frascati.demo.common.homeautomation.zibase.Zibase"/> -->
<!-- <interface.java interface="org.ow2.frascati.demo.zibase.Zibase" /> -->
<!-- <binding.ws uri="http://localhost:9100/zibase/invoke"/> -->
<!-- </reference> -->
</component>
<service name="onoffdim-actuator" promote="light/onoffdim-actuator">
......
/**
* OW2 FraSCAti Assembly Factory
* Copyright (C) 2008-2012 Inria, University of Lille
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Gwénaël Cattez
*
* Contributor(s):
*
*/
package org.ow2.frascati.ligthTest;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.ow2.frascati.FraSCAti;
import org.ow2.frascati.assembly.factory.api.ClassLoaderManager;
import org.ow2.frascati.assembly.factory.api.CompositeManager;
import org.ow2.frascati.demo.common.homeautomation.actuator.OnOffDimActuator;
import org.ow2.frascati.examples.test.FraSCAtiTestCase;
import org.ow2.frascati.util.FrascatiClassLoader;
import org.ow2.frascati.util.FrascatiException;
/**
*
*/
public class LigthTest extends FraSCAtiTestCase
{
/**FraSCAti instance**/
private static FraSCAti fraSCAti;
@Override
public String getComposite()
{
return "light";
}
/**
* Launch a new instance of FraSCAti and deploy Zibase component needed by the switch
*
* @throws FrascatiException
*/
@Before
public void init() throws FrascatiException
{
fraSCAti=FraSCAti.newFraSCAti();
try
{
ClassLoaderManager classLoaderManager = fraSCAti.getClassLoaderManager();
FrascatiClassLoader frascatiClassLoader = new FrascatiClassLoader(classLoaderManager.getClassLoader());
frascatiClassLoader.addUrl(new File("target/dependency/common-homeautomation-zibase-0.0.1-SNAPSHOT.jar").toURI().toURL());
CompositeManager compositeManager = fraSCAti.getCompositeManager();
compositeManager.getComposite("zibase.composite", frascatiClassLoader);
} catch (IOException e)
{
fail();
}
}
@Test
public final void testInvoke() throws InterruptedException
{
OnOffDimActuator ligth=getService(OnOffDimActuator.class, "onoffdim-actuator");
ligth.acturatorOn();
Thread.sleep(2000);
ligth.acturatorOff();
}
/**
* Close FraSCAti instance launch for this test
*
* @throws FrascatiException
*/
@AfterClass
public static void finish() throws FrascatiException
{
fraSCAti.close();
}
}
############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overridden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=INFO
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.ow2.frascati.level = INFO
org.ow2.frascati.assembly.factory.level = INFO
# org.ow2.frascati.assembly.factory.manager.level = OFF
# org.ow2.frascati.assembly.factory.manager.AssemblyFactoryManager.level = OFF
org.ow2.frascati.assembly.factory.processor.level = INFO
# org.ow2.frascati.assembly.factory.processor.ScaBindingProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaBindingScaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentPropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositePropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeReferenceProcessor.level = OFF