@@ -0,0 +1,2349 @@
+package org.openengsb.util.serialization;%0A%0Aimport java.io.Reader;%0Aimport java.io.Writer;%0A%0Aimport javax.xml.bind.JAXBContext;%0Aimport javax.xml.bind.JAXBException;%0Aimport javax.xml.bind.Marshaller;%0Aimport javax.xml.bind.Unmarshaller;%0A%0Apublic class JaxbXmlSerializer implements Serializer %7B%0A%0A    protected Unmarshaller unmarshaller;%0A    protected Marshaller marshaller;%0A%0A    public JaxbXmlSerializer(String packageName) throws SerializationException %7B%0A        JAXBContext context;%0A        try %7B%0A            context = JAXBContext.newInstance(packageName);%0A        %7D catch (JAXBException e) %7B%0A            throw new SerializationException(%22could not initialize %22 + this.getClass().getName(), e);%0A        %7D%0A        initHandlers(context);%0A    %7D%0A%0A    public JaxbXmlSerializer(Class%3C?%3E docClass) throws SerializationException %7B%0A        this(docClass.getPackage().getName());%0A    %7D%0A%0A    public JaxbXmlSerializer(Class%3C?%3E... docClasses) throws SerializationException %7B%0A        JAXBContext context;%0A        try %7B%0A            context = JAXBContext.newInstance(docClasses);%0A        %7D catch (JAXBException e) %7B%0A            throw new SerializationException(%22could not initialize %22 + this.getClass().getName(), e);%0A        %7D%0A        initHandlers(context);%0A    %7D%0A%0A    public JaxbXmlSerializer(JAXBContext context) throws SerializationException %7B%0A        initHandlers(context);%0A    %7D%0A%0A    private void initHandlers(JAXBContext context) throws SerializationException %7B%0A        try %7B%0A            unmarshaller = context.createUnmarshaller();%0A            marshaller = context.createMarshaller();%0A        %7D catch (JAXBException e) %7B%0A            throw new SerializationException(%22Could not initialize Handlers.%22, e);%0A        %7D%0A    %7D%0A%0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    public %3CT%3E T deserialize(Class%3CT%3E clazz, Reader reader) throws SerializationException %7B%0A        try %7B%0A            return (T) unmarshaller.unmarshal(reader);%0A        %7D catch (JAXBException e) %7B%0A            throw new SerializationException(%22Jaxb failed at deserializing%22, e);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public %3CT%3E void serialize(T object, Writer writer) throws SerializationException %7B%0A        try %7B%0A            marshaller.marshal(object, writer);%0A        %7D catch (JAXBException e) %7B%0A            throw new SerializationException(%22Jaxb failed at serializing%22, e);%0A        %7D%0A    %7D%0A%0A%7D%0A

add JaxbImplementation of Serializer-Interface (to easily replace jibx)