Package org.apache.muse.core.descriptor

Examples of org.apache.muse.core.descriptor.DeploymentDescriptor


        {
            //
            // load the muse.xml descriptor file
            //
            Environment env = createEnvironment();
            DeploymentDescriptor dd = createDeploymentDescriptor();
           
            Document ddXML = env.getDocument(DescriptorConstants.DESCRIPTOR_FILE_NAME);
            dd.load(ddXML, env);
           
            //
            // put all custom serializers in the serializer registry
            //
            Collection serializerDefinitions = dd.getSerializerDefinitions();
            Iterator i = serializerDefinitions.iterator();
           
            SerializerRegistry registry = SerializerRegistry.getInstance();
           
            while (i.hasNext())
            {
                SerializerDefinition next = (SerializerDefinition)i.next();
               
                Serializer ser = next.create();
                Class type = ser.getSerializableType();
               
                Class arrayType = ReflectUtils.getArrayClassFromClass(type);
                Serializer arraySer = new ArraySerializer(arrayType, ser);
               
                registry.registerSerializer(type, ser);
                registry.registerSerializer(arrayType, arraySer);
            }
           
            //
            // create the router, which will instantiate resources that
            // are specified in the deployment descriptor (using the
            // /muse/resource-type/@instances-at-startup attribute)
            //
            RouterDefinition routerDefinition = dd.getRouterDefinition();
            _router = routerDefinition.newInstance();
           
            _router.initialize();
            _hasBeenInitialized = true;
        }
View Full Code Here


        {
            //
            // load the muse.xml descriptor file
            //
            Environment env = createEnvironment();
            DeploymentDescriptor dd = createDeploymentDescriptor();
           
            Document ddXML = env.getDocument(DescriptorConstants.DESCRIPTOR_FILE_NAME);
            dd.load(ddXML, env);
           
            //
            // put all custom serializers in the serializer registry
            //
            Collection serializerDefinitions = dd.getSerializerDefinitions();
            Iterator i = serializerDefinitions.iterator();
           
            SerializerRegistry registry = SerializerRegistry.getInstance();
           
            while (i.hasNext())
            {
                SerializerDefinition next = (SerializerDefinition)i.next();
               
                Serializer ser = next.create();
                Class type = ser.getSerializableType();
               
                registry.registerSerializer(type, ser);
            }
           
            //
            // create the router, which will instantiate resources that
            // are specified in the deployment descriptor (using the
            // /muse/resource-type/@instances-at-startup attribute)
            //
            RouterDefinition routerDefinition = dd.getRouterDefinition();
            _router = routerDefinition.newInstance();
           
            _router.initialize();
            _hasBeenInitialized = true;
        }
View Full Code Here

TOP

Related Classes of org.apache.muse.core.descriptor.DeploymentDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.