Package com.volantis.synergetics.reporting.config

Examples of com.volantis.synergetics.reporting.config.JDBCDatasource


     * @throws JiBXException if unmarshalling failed
     */
    private DatasourceConfiguration unmarshalJDBCDatasource(
            UnmarshallingContext ctx) throws JiBXException {
       
        JDBCDatasource source = new JDBCDatasource();
        ctx.parsePastStartTag(ctx.getNamespace(),
                JDBC_DATASOURCE_TAG_NAME);
   
        source.setDriverClass(
                getTagsTextContent(ctx, DRIVER_CLASS_TAG_NAME));
        source.setConnectionString(
                getTagsTextContent(ctx, CONNECTION_STRING_TAG_NAME));
   
        unmarshalName(ctx, source);
       
        ctx.toEnd();
View Full Code Here


            throws JiBXException {
        MarshallingContext ctx = (MarshallingContext) context;
        DatasourceConfiguration dataSource = (DatasourceConfiguration) arg0;
        DataSourceType type = dataSource.getType();
        if (type == DataSourceType.JDBC_DATASOURCE) {
            JDBCDatasource jdbcDatasource = (JDBCDatasource) dataSource;
            ctx.startTag(index, JDBC_DATASOURCE_TAG_NAME);

            writeTagsTextContent(ctx, DRIVER_CLASS_TAG_NAME,
                    jdbcDatasource.getDriverClass());
            writeTagsTextContent(ctx, CONNECTION_STRING_TAG_NAME,
                    jdbcDatasource.getConnectionString());

            marshalName(index, ctx, jdbcDatasource.getName());
           
            ctx.endTag(index, JDBC_DATASOURCE_TAG_NAME);             
        } else if (type == DataSourceType.INTERNAL_POOL_DATASOURCE) {
            InternalPoolDatasource internalPoolDatasource =
                (InternalPoolDatasource) dataSource;  
View Full Code Here

        DatasourceConfiguration datasource = parseDatasource(
                new ByteArrayInputStream(ANONYMOUS_JDBC_DATASOURCE.getBytes()));

        assertEquals(DataSourceType.JDBC_DATASOURCE, datasource.getType());
       
        JDBCDatasource jdbcDatasource = (JDBCDatasource) datasource;
       
        assertEquals("org.gjt.mm.mysql.Driver", jdbcDatasource.getDriverClass());
        assertEquals("jdbc:mysql://127.0.0.1/logging?user=logger&password=logpass&database=logging",
                jdbcDatasource.getConnectionString());       
       
    }
View Full Code Here

TOP

Related Classes of com.volantis.synergetics.reporting.config.JDBCDatasource

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.