Examples of Main


Examples of org.codehaus.spice.jndikit.rmi.server.Main

    }

    private void startServer()
        throws Exception
    {
        m_server = new Main( true, m_port );
        m_server.start();

        m_serverThread = new Thread( m_server );
        m_serverThread.start();
        while( !m_server.isRunning() )
View Full Code Here

Examples of org.data2semantics.platform.annotation.Main

  {
    Class<?> curClass =  loadClass(instance.module().source());
   
    // Retrieve the main method and its annotation
    Method mainMethod = PlatformUtil.getMainMethod(curClass);
    Main mainAnnotation = PlatformUtil.getMainAnnotation(curClass);
   
    try {
      // This is where the module is actually executed
      Object result = mainMethod.invoke(moduleObject);
     
      // Store the result of the main method as the first output
      if(result != null) // if the main method is not null
        outputs.put(mainAnnotation.name(), result);
     
    } catch (Exception e)
    {
      throw new RuntimeException("Something went wrong during module execution.", e);
    }
View Full Code Here

Examples of org.dozer.vo.inheritance.Main

  public Main getMain() {
    Sub sub = newInstance(Sub.class);
    sub.setName("sName");
    sub.setDetail("sDetail");
    sub.setMarker("sMarker");
    Main result = newInstance(Main.class);
    result.setName("topLevelName");
    result.setSub(sub);
    return result;
  }
View Full Code Here

Examples of org.dozer.vo.inheritance.Main

  }
 
  @Test
  public void testSubMarker() {
    mapper = super.getMapper("inheritanceMapping.xml");
    Main src = testDataFactory.getMain();

    // Map to Dto
    MainDto dest = mapper.map(src, MainDto.class);
    assertNotNull(dest);
    assertEquals(src.getName(), dest.getName());
   
    SubMarker subMarker = src.getSub();
    SubMarkerDto subMarkerDto = dest.getSub();
    assertNotNull(subMarkerDto);
    assertNull(subMarkerDto.getSub());
    assertEquals(subMarker.getMarker(), subMarkerDto.getMarker());
    assertEquals(subMarker.getName(), subMarkerDto.getName());

    Sub sub = (Sub) subMarker;
    SubDto subDto = (SubDto) subMarkerDto;
    assertEquals(sub.getDetail(), subDto.getDetail());
   
   
    // Map back
    src = mapper.map(dest, Main.class);
    assertNotNull(dest);
    assertEquals(dest.getName(), src.getName());

    subMarker = src.getSub();
    assertNotNull(subMarker);
    assertNull(subMarker.getSub());
    assertNull(subMarker.getMarker());//One way mapping
    assertEquals(subMarkerDto.getName(), subMarker.getName());
   
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.batch.Main

    this.apiLevel = level;
    initializeDefaults();
  }

  private List getClasspath() throws IllegalStateException {
    Main main = new Main(new PrintWriter(System.out), new PrintWriter(System.err), false/*systemExit*/, null/*options*/, null/*progress*/);
    ArrayList allClasspaths = new ArrayList();
    try {
      if ((this.bits & CompilationUnitResolver.INCLUDE_RUNNING_VM_BOOTCLASSPATH) != 0) {
        org.eclipse.jdt.internal.compiler.util.Util.collectRunningVMBootclasspath(allClasspaths);
      }
      if (this.sourcepaths != null) {
        for (int i = 0, max = this.sourcepaths.length; i < max; i++) {
          String encoding = this.sourcepathsEncodings == null ? null : this.sourcepathsEncodings[i];
          main.processPathEntries(
              Main.DEFAULT_SIZE_CLASSPATH,
              allClasspaths, this.sourcepaths[i], encoding, true, false);
        }
      }
      if (this.classpaths != null) {
        for (int i = 0, max = this.classpaths.length; i < max; i++) {
          main.processPathEntries(
              Main.DEFAULT_SIZE_CLASSPATH,
              allClasspaths, this.classpaths[i], null, false, false);
        }
      }
      ArrayList pendingErrors = main.pendingErrors;
View Full Code Here

Examples of org.exist.start.Main

    }
   
    protected void setUp() throws Exception {
       
        if(mn==null){
            mn = new Main("jetty");
            mn.run(new String[]{"jetty"});
        }
       
        QueryService service = new QueryServiceLocator();
        query = service.getQuery(new URL(XQueryTest.query_url));
View Full Code Here

Examples of org.jboss.Main

      assertNotNull("jbosstest.deploy.dir != null", deployDirProp);
      // Set the deploy prefix
     

      String[] args = {"-c", "defaulthotdeploy", "-Djboss.server.deployerBeansPrefix="+deployPrefix};
      Main main = new Main();
      main.boot(args);
      Server server = main.getServer();
      assertTrue("Server", server instanceof ServerImpl);
      ServerImpl serverImpl = (ServerImpl) server;

      // Validate that the expected deployment beans exist
      Kernel kernel = serverImpl.getKernel();
      assertInstalled(kernel, "ProfileService");
      assertInstalled(kernel, "MainDeployer");
      assertInstalled(kernel, "BeanDeployer");
      assertInstalled(kernel, "VFSDeploymentScanner");
      KernelRegistry registry = kernel.getRegistry();
      KernelRegistryEntry entry = registry.getEntry("VFSDeploymentScanner");
      /** TODO DeploymentScanner scanner = (DeploymentScanner) entry.getTarget();
      synchronized( scanner )
      {
         while( scanner.getScanCount() <= 0 )
            scanner.wait(10000);
      }
      log.info("Notified of scan: "+scanner.getScanCount());
      */

      // Expected hot deployments
      assertInstalled(kernel, "VFSClassLoader");
      assertInstalled(kernel, "TestBean");
      assertInstalled(kernel, "VFSClassLoader-unpacked");
      assertInstalled(kernel, "TestBean-unpacked");
      entry = registry.getEntry("TestBean");
      Object testBean = entry.getTarget();
      CodeSource testBeanCS = testBean.getClass().getProtectionDomain().getCodeSource();
      log.info("TestBean.CS: "+testBeanCS);
      log.info("TestBean.ClassLoader: "+testBean.getClass().getClassLoader());
     

      // Shutdown
      main.shutdown();
   }
View Full Code Here

Examples of org.jnp.server.Main

            log.info("Remoting JNDI detector starting JNDI server instance since none where specified via configuration.");
            log.info("Remoting JNDI server started on host + " + host + " and port " + port);

            //If no server information provided, then start one of our own by default
            Main server = new Main();
            server.setPort(port);
            server.setBindAddress(host);
            server.start();

            contextFactory = NamingContextFactory.class.getName();
            urlPackage = "org.jboss.naming:org.jnp.interfaces";
         }
         catch(Exception e)
View Full Code Here

Examples of org.jnp.server.Main

         {
            return;
         }
         try
         {
            jndiServer = new Main();
            namingBean = new NamingBeanImpl();
            jndiServer.setNamingInfo(namingBean);
            executor = Executors.newCachedThreadPool();
            jndiServer.setLookupExector(executor);
            jndiServer.setPort(port);
View Full Code Here

Examples of org.jnp.server.Main

   @BeforeClass
   public void startJndiServer() throws Exception {
      // Create an in-memory jndi
      namingServer = new SingletonNamingServer();
      namingMain = new Main();
      namingMain.setInstallGlobalService(true);
      namingMain.setPort(-1);
      namingMain.start();
      props = new Properties();
      props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
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.