An ObjectFactory allows you to programatically 19 | * construct new instances of the Java representation 20 | * for XML content. The Java representation of XML 21 | * content can consist of schema derived interfaces 22 | * and classes representing the binding of schema 23 | * type definitions, element declarations and model 24 | * groups. Factory methods for each of these are 25 | * provided in this class. 26 | * 27 | */ 28 | @XmlRegistry 29 | public class ObjectFactory { 30 | 31 | 32 | /** 33 | * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: pl.grzejszczak.marcin.camel.jaxb.generated 34 | * 35 | */ 36 | public ObjectFactory() { 37 | } 38 | 39 | /** 40 | * Create an instance of {@link PlayerDetails } 41 | * 42 | */ 43 | public PlayerDetails createPlayerDetails() { 44 | return new PlayerDetails(); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Camel and Spring/src/main/pl/grzejszczak/marcin/camel/jaxb/generated/PositionType.java: -------------------------------------------------------------------------------- 1 | // 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 3 | // See http://java.sun.com/xml/jaxb 4 | // Any modifications to this file will be lost upon recompilation of the source schema. 5 | // Generated on: 2012.11.05 at 09:23:22 PM CET 6 | // 7 | 8 | 9 | package pl.grzejszczak.marcin.camel.jaxb.generated; 10 | 11 | import javax.xml.bind.annotation.XmlEnum; 12 | import javax.xml.bind.annotation.XmlType; 13 | 14 | 15 | /** 16 | *
Java class for PositionType. 17 | * 18 | *
The following schema fragment specifies the expected content contained within this class. 19 | *
20 | *
21 | * <simpleType name="PositionType"> 22 | * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> 23 | * <enumeration value="GK"/> 24 | * <enumeration value="DEF"/> 25 | * <enumeration value="MID"/> 26 | * <enumeration value="ATT"/> 27 | * </restriction> 28 | * </simpleType> 29 | *30 | * 31 | */ 32 | @XmlType(name = "PositionType") 33 | @XmlEnum 34 | public enum PositionType { 35 | 36 | GK, 37 | DEF, 38 | MID, 39 | ATT; 40 | 41 | public String value() { 42 | return name(); 43 | } 44 | 45 | public static PositionType fromValue(String v) { 46 | return valueOf(v); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Camel and Spring/src/main/pl/grzejszczak/marcin/camel/manual/ActiveMQRouter.java: -------------------------------------------------------------------------------- 1 | package pl.grzejszczak.marcin.camel.manual; 2 | 3 | import java.io.File; 4 | import java.util.Scanner; 5 | 6 | import javax.jms.JMSException; 7 | 8 | import org.springframework.context.ApplicationContext; 9 | import org.springframework.context.support.ClassPathXmlApplicationContext; 10 | import org.springframework.core.io.ClassPathResource; 11 | import org.springframework.core.io.Resource; 12 | 13 | import pl.grzejszczak.marcin.camel.jaxb.PlayerDetailsConverter; 14 | import pl.grzejszczak.marcin.camel.jaxb.generated.PlayerDetails; 15 | import pl.grzejszczak.marcin.camel.manual.jms.FinalListenerImpl; 16 | import pl.grzejszczak.marcin.camel.manual.jms.Sender; 17 | 18 | public class ActiveMQRouter { 19 | 20 | /** 21 | * @param args 22 | * @throws JMSException 23 | */ 24 | public static void main(String[] args) throws Exception { 25 | ApplicationContext context = new ClassPathXmlApplicationContext("/camel/jmsApplicationContext.xml"); 26 | @SuppressWarnings("unchecked") 27 | Sender