Examples of DataSourceDefinition


Examples of javax.annotation.sql.DataSourceDefinition

    public DataSourceDefinitionHandler() {
    }

    protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, ResourceContainerContext[] rcContexts)
            throws AnnotationProcessorException {
        DataSourceDefinition dataSourceDefnAn =
                (DataSourceDefinition)ainfo.getAnnotation();
        return processAnnotation(dataSourceDefnAn, ainfo, rcContexts);
    }
View Full Code Here

Examples of javax.annotation.sql.DataSourceDefinition

                    buildDataSourceDefinition(consumer, definition);
                }
            }

            for (Annotated<Class<?>> annotated : annotationFinder.findMetaAnnotatedClasses(DataSourceDefinition.class)) {
                DataSourceDefinition definition = annotated.getAnnotation(DataSourceDefinition.class);
                buildDataSourceDefinition(consumer, definition);
            }
        }
View Full Code Here

Examples of javax.annotation.sql.DataSourceDefinition

                    buildDataSourceDefinition(consumer, definition);
                }
            }

            for (Annotated<Class<?>> annotated : annotationFinder.findMetaAnnotatedClasses(DataSourceDefinition.class)) {
                DataSourceDefinition definition = annotated.getAnnotation(DataSourceDefinition.class);
                buildDataSourceDefinition(consumer, definition);
            }
        }
View Full Code Here

Examples of javax.annotation.sql.DataSourceDefinition

  }
 
  @Override
  public ConfigProgram introspectField(AnnotatedField<?> field)
  {
    DataSourceDefinition db = field.getAnnotation(DataSourceDefinition.class);
   
    return generateProgram(field, db);
  }
View Full Code Here

Examples of javax.annotation.sql.DataSourceDefinition

  }
 
  @Override
  public ConfigProgram introspectMethod(AnnotatedMethod<?> method)
  {
    DataSourceDefinition db = method.getAnnotation(DataSourceDefinition.class);
   
    return generateProgram(method, db);
  }
View Full Code Here

Examples of javax.annotation.sql.DataSourceDefinition

        for (DataSourceDefinition db : dbs.value()) {
          introspectClass(getClass().getName(), db);
        }
      }

      DataSourceDefinition db
        = parentClass.getAnnotation(DataSourceDefinition.class);

      if (db != null)
        introspectClass(getClass().getName(), db);
    }
   
    DataSourceDefinitions dbs = type.getAnnotation(DataSourceDefinitions.class);

    if (dbs != null) {
      for (DataSourceDefinition db : dbs.value()) {
        introspectClass(getClass().getName(), db);
      }
    }

    DataSourceDefinition db = type.getAnnotation(DataSourceDefinition.class);

    if (db != null)
      introspectClass(getClass().getName(), db);

    return new NullProgram();
View Full Code Here

Examples of org.apache.jackrabbit.core.config.DataSourceConfig.DataSourceDefinition

     * @throws RepositoryException if there is no {@code DataSource} with the given name
     */
    public String getDataBaseType(String logicalName) throws RepositoryException {
        synchronized (lock) {
            sanityCheck();
            DataSourceDefinition def = nameToDataSourceDef.get(logicalName);
            if (def == null) {
                throw new RepositoryException("DataSource with logicalName " + logicalName
                        + " has not been configured");
            }
            return def.getDbType();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.config.DataSourceConfig.DataSourceDefinition

     * @throws RepositoryException if there is no {@code DataSource} with the given name
     */
    public String getDataBaseType(String logicalName) throws RepositoryException {
        synchronized (lock) {
            sanityCheck();
            DataSourceDefinition def = nameToDataSourceDef.get(logicalName);
            if (def == null) {
                throw new RepositoryException("DataSource with logicalName " + logicalName
                        + " has not been configured");
            }
            return def.getDbType();
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.config.DataSourceConfig.DataSourceDefinition

        assertEquals(0, cfg.getDefinitions().size());
    }

    public void testMinimalRegularConfig() throws ConfigurationException {
        cfg.addDataSourceDefinition(minimalProps);
        DataSourceDefinition def = cfg.getDefinitions().get(0);
        assertEquals("ds", def.getLogicalName());
        assertEquals("org.apache.derby.jdbc.EmbeddedDriver", def.getDriver());
        assertEquals("url", def.getUrl());
        assertEquals("dbType", def.getDbType());
        // check default values:
        assertNull(def.getUser());
        assertNull(def.getPassword());
        assertNull(def.getValidationQuery());
        assertEquals(-1, def.getMaxPoolSize()); // unlimited
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.config.DataSourceConfig.DataSourceDefinition

        assertEquals(0, cfg.getDefinitions().size());
    }

    public void testMinimalRegularConfig() throws ConfigurationException {
        cfg.addDataSourceDefinition("ds", minimalProps);
        DataSourceDefinition def = cfg.getDefinitions().get(0);
        assertEquals("ds", def.getLogicalName());
        assertEquals("org.apache.derby.jdbc.EmbeddedDriver", def.getDriver());
        assertEquals("url", def.getUrl());
        assertEquals("dbType", def.getDbType());
        // check default values:
        assertNull(def.getUser());
        assertNull(def.getPassword());
        assertNull(def.getValidationQuery());
        assertEquals(-1, def.getMaxPoolSize()); // unlimited
    }
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.