Package com.volantis.synergetics.reporting.config

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


     * @throws JiBXException if unmarshalling failed
     */
    private DatasourceConfiguration unmarshalInternalPoolDatasource(
            UnmarshallingContext ctx) throws JiBXException {
       
        InternalPoolDatasource source = new InternalPoolDatasource();

        ctx.parsePastStartTag(ctx.getNamespace(),
                INTERNAL_POOL_DATASOURCE_TAG_NAME);

        source.setDriverClass(getTagsTextContent(ctx, DRIVER_CLASS_TAG_NAME));
        source.setUrl(getTagsTextContent(ctx, URL_TAG_NAME));
        source.setUsername(getTagsTextContent(ctx, USERNAME_TAG_NAME));
        source.setPassword(getTagsTextContent(ctx, PASSWORD_TAG_NAME));
        source.setMaxActive(getTagsTextContent(ctx, MAX_ACTIVE_TAG_NAME));
        source.setMaxIdle(getTagsTextContent(ctx, MAX_IDLE_TAG_NAME));
        source.setMaxWait(getTagsTextContent(ctx, MAX_WAIT_TAG_NAME));

        unmarshalName(ctx, source);
       
        ctx.toEnd();
        ctx.parsePastEndTag(ctx.getNamespace(),
View Full Code Here


            marshalName(index, ctx, jdbcDatasource.getName());
           
            ctx.endTag(index, JDBC_DATASOURCE_TAG_NAME);             
        } else if (type == DataSourceType.INTERNAL_POOL_DATASOURCE) {
            InternalPoolDatasource internalPoolDatasource =
                (InternalPoolDatasource) dataSource;  
            ctx.startTag(index, INTERNAL_POOL_DATASOURCE_TAG_NAME);
           
            writeTagsTextContent(ctx, DRIVER_CLASS_TAG_NAME,
                    internalPoolDatasource.getDriverClass());
            writeTagsTextContent(ctx, URL_TAG_NAME,
                    internalPoolDatasource.getUrl());
            writeTagsTextContent(ctx, USERNAME_TAG_NAME,
                    internalPoolDatasource.getUsername());
            writeTagsTextContent(ctx, PASSWORD_TAG_NAME,
                    internalPoolDatasource.getPassword());
            writeTagsTextContent(ctx, MAX_ACTIVE_TAG_NAME,
                    internalPoolDatasource.getMaxActive());
            writeTagsTextContent(ctx, MAX_IDLE_TAG_NAME,
                    internalPoolDatasource.getMaxIdle());
            writeTagsTextContent(ctx, MAX_WAIT_TAG_NAME,
                    internalPoolDatasource.getMaxWait());

            marshalName(index, ctx, internalPoolDatasource.getName());
           
            ctx.endTag(index, INTERNAL_POOL_DATASOURCE_TAG_NAME);           
        } else if (type == DataSourceType.JNDI_DATASOURCE) {
            JNDIDatasource jndiDatasource = (JNDIDatasource) dataSource;
            ctx.startTag(index, JNDI_DATASOURCE_TAG_NAME);
View Full Code Here

                        ANONYMOUS_INTERNAL_POOL_DATASOURCE.getBytes()));

        assertEquals(DataSourceType.INTERNAL_POOL_DATASOURCE,
                datasource.getType());
       
        InternalPoolDatasource internalPoolDatasource =
            (InternalPoolDatasource) datasource;
    
        assertEquals("org.gjt.mm.mysql.Driver",
                internalPoolDatasource.getDriverClass());
        assertEquals("jdbc:mysql://127.0.0.1/logging?database=logging",
                internalPoolDatasource.getUrl());
        assertEquals("db_user", internalPoolDatasource.getUsername());
        assertEquals("db_password", internalPoolDatasource.getPassword());
        assertEquals("30", internalPoolDatasource.getMaxActive());
        assertEquals("10", internalPoolDatasource.getMaxIdle());
        assertEquals("5", internalPoolDatasource.getMaxWait());
    }
View Full Code Here

       
        DatasourceConfiguration datasource = parseDatasource(
                new ByteArrayInputStream(
                        ANONYMOUS_INTERNAL_POOL_DATASOURCE_EMPTY_PASSWORD.getBytes()));
       
        InternalPoolDatasource internalPoolDatasource =
            (InternalPoolDatasource) datasource;
    
        assertEquals("", internalPoolDatasource.getPassword());
    }
View Full Code Here

TOP

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

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.