Examples of addURL()


Examples of org.hibernate.cfg.Configuration.addURL()

        URL url = Thread.currentThread().getContextClassLoader().getResource(config_path);
        if (url == null) {
            log.error("hibernate config file not found: {}", config_path);
        } else {
            log.info("adding hibernate config file {}", config_path);
            conf_.addURL(url);
        }

        sessionFactory_ = SecurityHelper.doPrivilegedAction(new PrivilegedAction<SessionFactory>() {
            public SessionFactory run() {
                SessionFactory factory = conf_.configure().buildSessionFactory();
View Full Code Here

Examples of org.hibernate.cfg.Configuration.addURL()

      assertEquals( inv.getType(), "resource" );
      assertEquals( inv.getPath(), "nothere" );
    }

    try {
      cfg.addURL( new URL( "file://nothere" ) );
      fail();
    }
    catch ( InvalidMappingException inv ) {
      assertEquals( inv.getType(), "URL" );
      assertEquals( inv.getPath(), "file://nothere" );
View Full Code Here

Examples of org.hibernate.cfg.Configuration.addURL()

      assertEquals( inv.getPath(), resourceName );
      assertTrue( !( inv.getCause() instanceof MappingNotFoundException ) );
    }

    try {
      cfg.addURL( ConfigHelper.findAsResource( resourceName ) );
      fail();
    }
    catch ( InvalidMappingException inv ) {
      assertEquals( inv.getType(), "URL" );
      assertTrue( inv.getPath().endsWith( "InvalidMapping.hbm.xml" ) );
View Full Code Here

Examples of org.jboss.bootstrap.ServerLoader.addURL()

         {
            File dir = new File(bootURL.getFile());
            if (dir.exists())
            {
               // Add the local file patch directory
               loader.addURL(dir.toURL());

               // Add the contents of the directory too
               File[] jars = dir.listFiles(new JarFilter());

               for (int j = 0; jars != null && j < jars.length; j++)
View Full Code Here

Examples of org.jboss.bootstrap.ServerLoader.addURL()

               // Add the contents of the directory too
               File[] jars = dir.listFiles(new JarFilter());

               for (int j = 0; jars != null && j < jars.length; j++)
               {
                  loader.addURL(jars[j].getCanonicalFile().toURL());
               }
            }
         }
         else
         {
View Full Code Here

Examples of org.jboss.bootstrap.ServerLoader.addURL()

               }
            }
         }
         else
         {
            loader.addURL(bootURL);
         }
      }

      // Add any extra libraries
      for (int i = 0; i < bootLibraries.size(); i++)
View Full Code Here

Examples of org.jboss.bootstrap.ServerLoader.addURL()

      }

      // Add any extra classapth URLs
      for (int i = 0; i < extraClasspath.size(); i++)
      {
         loader.addURL(extraClasspath.get(i));
      }

      // Load the server
      ClassLoader parentCL = Thread.currentThread().getContextClassLoader();
      server = loader.load(parentCL);
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader.addURL()

         RepositoryClassLoader ucl = (RepositoryClassLoader) cl;

         // We may be undeploying.
         if (ucl.getLoaderRepository() != null)
         {
            ucl.addURL(tmpCP);
         }
        
         return tmpCP;
      }
      catch(Exception e)
View Full Code Here

Examples of org.jboss.mx.loading.RepositoryClassLoader.addURL()

      RepositoryClassLoader ucl = (RepositoryClassLoader) cl;

      // We may be undeploying.
      if (ucl.getLoaderRepository() != null)
      {
         ucl.addURL(tmpCP);
      }
     
      return tmpCP;
   }
View Full Code Here

Examples of org.jboss.system.server.ServerLoader.addURL()

/* 153 */       if (this.bootURL.getProtocol().equals("file"))
/*     */       {
/* 155 */         File dir = new File(this.bootURL.getFile());
/* 156 */         if (dir.exists())
/*     */         {
/* 159 */           loader.addURL(dir.toURL());
/*     */
/* 162 */           File[] jars = dir.listFiles(new JarFilter());
/*     */
/* 164 */           for (int j = 0; (jars != null) && (j < jars.length); j++)
/*     */           {
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.