Package org.apache.tuscany.sca.data.engine.config

Examples of org.apache.tuscany.sca.data.engine.config.ConnectionProperties


            String username = reader.getAttributeValue(null, "username");
            String password = reader.getAttributeValue(null, "password");
            String loginTimeout = reader.getAttributeValue(null, "loginTimeout");

            // FIXME: validation sending info to monitor....
            ConnectionProperties connectionProperties = new ConnectionProperties();
            connectionProperties.setDriverClass(driverClass);
            connectionProperties.setDatabaseURL(databaseURL);
            connectionProperties.setUsername(username);
            connectionProperties.setPassword(password);
            if (loginTimeout != null) {
                connectionProperties.setLoginTimeout(Integer.parseInt(loginTimeout));
            }

            connectionInfo.setConnectionProperties(connectionProperties);
        }
       
View Full Code Here


        if (connectionInfo.getDataSource() != null) {
            writer.writeAttribute("dataSource", connectionInfo.getDataSource());
        }
       
        ConnectionProperties connectionProperties = connectionInfo.getConnectionProperties();
        if (connectionProperties != null) {
            writer.writeStartElement(CONNECTION_PROPERTIES.getNamespaceURI(), CONNECTION_PROPERTIES.getLocalPart());
           
            if (connectionProperties.getDriverClass() != null) {
                writer.writeAttribute("driverClass", connectionProperties.getDriverClass());
            }
            if (connectionProperties.getDatabaseURL() != null) {
                writer.writeAttribute("databaseURL", connectionProperties.getDatabaseURL());
            }
            if (connectionProperties.getUsername() != null) {
                writer.writeAttribute("username", connectionProperties.getUsername());
            }
            if (connectionProperties.getPassword() != null) {
                writer.writeAttribute("password", connectionProperties.getPassword());
            }
            if (connectionProperties.getLoginTimeout() != null) {
                writer.writeAttribute("loginTimeout", String.valueOf(connectionProperties.getLoginTimeout()));
            }
           
            writer.writeEndElement();
        }
       
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.data.engine.config.ConnectionProperties

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.