Examples of Main


Examples of org.apache.camel.spring.Main

     * Allow this route to be run as an application
     *
     * @param args
     */
    public static void main(String[] args) {
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.camel.spring.Main

    private MyMain() {
        // to comply with check style
    }

    public static void main(String[] args) throws Exception {
        Main main = new Main();
        main.setApplicationContextUri("META-INF/spring/camel-config.xml");
        main.start();
    }
View Full Code Here

Examples of org.apache.camel.spring.javaconfig.Main

     *
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.camel.spring.javaconfig.Main

   
    /**
     * Allow this route to be run as an application
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.derby.impl.tools.ij.Main

                getNewOutput(sqlOut)
              
              LocalizedResource.getInstance().
                    getNewEncodedOutput(sqlOut, outputEncoding);

    Main ijE;
    if (JVMInfo.JDK_ID == JVMInfo.J2SE_13)
    {
      ijE = new Main(false);
    }
    else
    {
      // temp - allow ij to continue to work under jdk131
      // will resolve as part of DEBRY-1609
      // jdk13 gets error loading Main14 due to the
      // class now being built with the jdk14 target flag.
      // ijE = new org.apache.derby.impl.tools.ij.Main14(false);
      ijE = new Main(false);
    }   
   
    LocalizedInput li = LocalizedResource.getInstance().
              getNewEncodedInput(sqlIn, inputEncoding);
   
    utilMain um = ijE.getutilMain(1, lo);

    return um.goScript(conn, li);
  }
View Full Code Here

Examples of org.apache.felix.karaf.main.Main

      System.err.println("Root: " + root);
      System.setProperty("karaf.home", root);
      System.setProperty("karaf.base", root);
      System.setProperty("karaf.startLocalConsole", "false");
      System.setProperty("karaf.startRemoteShell", "true");
      main = new Main(new String[0]);
            main.launch();
    } catch (Exception e) {
      main = null;
      e.printStackTrace();
    }
View Full Code Here

Examples of org.apache.geronimo.kernel.util.Main

        }
    }
   
    private void registerMainService(BundleContext bundleContext, Kernel kernel) {
        try {
            final Main main = kernel.getGBean(Main.class);
            bundleContext.registerService(
                    org.apache.geronimo.main.Main.class.getName(),
                    new org.apache.geronimo.main.Main() {
                        public int execute(Object opaque) {
                            return main.execute(opaque);
                        }                   
                    },
                    null);
        } catch (GBeanNotFoundException e) {
            // ignore
View Full Code Here

Examples of org.apache.geronimo.kernel.util.Main

        }
    }
   
    private void registerMainService(BundleContext bundleContext, Kernel kernel) {
        try {
            final Main main = kernel.getGBean(Main.class);
            bundleContext.registerService(
                    org.apache.geronimo.main.Main.class.getName(),
                    new org.apache.geronimo.main.Main() {
                        public int execute(Object opaque) {
                            return main.execute(opaque);
                        }                   
                    },
                    null);
        } catch (GBeanNotFoundException e) {
            // ignore
View Full Code Here

Examples of org.apache.jackrabbit.ocm.testmodel.collection.Main

         
            // --------------------------------------------------------------------------------
            // Create and store an object graph in the repository with null hashmap
            // --------------------------------------------------------------------------------

            Main main = new Main();
            main.setPath("/test");
            main.setText("Main text");
                       
            ocm.insert(main);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            main = (Main) ocm.getObject( "/test");           
            assertTrue("Incorrect text", main.getText().equals("Main text"));          
            assertNull("HashMap is not null", main.getHashMap());
           
            // --------------------------------------------------------------------------------
            // Update an object graph in the repository
            // --------------------------------------------------------------------------------

            main = new Main();
            main.setPath("/test");
            main.setText("Main text");
           
            HashMapElement hashMapElement = new HashMapElement();
            Element e1 = new Element();
            e1.setId("e1");
            e1.setText("Element 1");
            hashMapElement.addObject(e1);
           
            Element e2 = new Element();
            e2.setId("e2");
            e2.setText("Element 2");
            hashMapElement.addObject(e2);
           
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            main = (Main) ocm.getObject( "/test");
            assertNotNull("main.getHashMap() is null", main.getHashMap());
            assertTrue("Incorrect text", main.getText().equals("Main text"));          
            assertTrue("Incorrect para element", ((Element) main.getHashMap().get("e1")).getText().equals("Element 1"));
           
            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            hashMapElement = new HashMapElement();
            e1 = new Element();
            e1.setId("e1");
            e1.setText("Element 1");
            hashMapElement.addObject(e1);
           
            e2 = new Element();
            e2.setId("e3");
            e2.setText("Element 3");
            hashMapElement.addObject(e2);

            Element e3 = new Element();
            e3.setId("e4");
            e3.setText("Element 4");
            hashMapElement.addObject(e3);
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            assertNotNull("main.getElements() is null", main.getHashMap());
            assertTrue("Incorrect text", main.getText().equals("Main text"));          
            assertTrue("Incorrect para element", ((Element) main.getHashMap().get("e4")).getText().equals("Element 4"));
           
        }
        catch (Exception e)
        {
            e.printStackTrace();
View Full Code Here

Examples of org.apache.jackrabbit.ocm.testmodel.proxy.Main

        Detail detail = new Detail();
        detail.setField("field" + i);       
        details.add(detail);
      }
     
      Main main = new Main();
      main.setProxyCollection(details);
      main.setPath("/test");             
            ocm.insert(main);
      ocm.save();
     
     
      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
      main = (Main) ocm.getObject( "/test");
      assertNotNull("main is null", main);

            Collection result = main.getProxyCollection();
            assertEquals("Invalide size", result.size(), 100);
            assertNull("nullcollectionproxy  is not null", main.getNullProxyCollection());
     
      //---------------------------------------------------------------------------------------------------------
      // Update 
      //---------------------------------------------------------------------------------------------------------
           
            Detail detail = new Detail();
      detail.setField("newFieldValue");     
      result.add(detail);
      main.setProxyCollection(result);
      ocm.update(main);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
      main = (Main) ocm.getObject("/test");
      assertNotNull("main  is null", main);
            assertEquals("Invalide size",main.getProxyCollection().size(), 101);
            assertNull("nullcollectionproxy  is not null", main.getNullProxyCollection());

            //---------------------------------------------------------------------------------------------------------
      // Delete the main object
      //---------------------------------------------------------------------------------------------------------           
      ocm.remove("/test");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.