Package br.com.caelum.vraptor.environment

Examples of br.com.caelum.vraptor.environment.Environment


    configureExtras();
  }

  protected URL getHibernateCfgLocation() {
    if (isEnvironmentAvailable()) {
      Environment env = container.instanceFor(Environment.class);
      return env.getResource(getHibernateCfgName());
    }

    return getClass().getResource(getHibernateCfgName());
  }
View Full Code Here


   
    super.init(cfg);
   
    try {
     
      Environment environment = new ServletBasedEnvironment(getServletContext());
     
      if(!"production".equalsIgnoreCase(environment.getName())){
        return;
      }
   
      final String url = "http://localhost:8080" + cfg.getServletContext().getContextPath() + "/jobs/configure";
View Full Code Here

    factory.close();
  }
 
  private URL getHibernateCfgLocation() {
    if (isEnvironmentAvailable()) {
      Environment env = container.instanceFor(Environment.class);
      return env.getResource(getHibernateCfgName());
    }

    return getClass().getResource(getHibernateCfgName());
  }
View Full Code Here

  @Before
  public void setup() throws Exception {
    stream = new ByteArrayOutputStream();
   
    Environment environment = mock(Environment.class);

    HttpServletResponse response = mock(HttpServletResponse.class);
    when(response.getWriter()).thenReturn(new PrintWriter(stream));
    DefaultTypeNameExtractor extractor = new DefaultTypeNameExtractor();
    XStreamBuilder builder = XStreamBuilderImpl.cleanInstance(new MessageConverter());
View Full Code Here

        configureExtras();
    }

    protected URL getHibernateCfgLocation() {
        if (isEnvironmentAvailable()) {
            Environment env = container.instanceFor(Environment.class);
            return env.getResource(getHibernateCfgName());
        }

        return getClass().getResource(getHibernateCfgName());
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.environment.Environment

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.