Package org.apache.openejb.client

Examples of org.apache.openejb.client.DataSourceMetaData


                    return;
                } else if (object == null) {
                    throw new NullPointerException("lookup of '"+name+"' returned null");
                } else if (object instanceof JdbcConnectionFactory){
                    JdbcConnectionFactory cf = (JdbcConnectionFactory) object;
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getJdbcDriver(), cf.getJdbcUrl(), cf.getDefaultUserName(), cf.getDefaultPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                    return;
                } else if (object instanceof ConnectionFactory){
                    res.setResponseCode(ResponseCodes.JNDI_RESOURCE);
View Full Code Here


                throw new NullPointerException("lookup of '" + name + "' returned null");
            } else if (object instanceof DataSource) {
                if (isDbcpDataSource(object)) {
                    try {
                        DbcpDataSource cf = new DbcpDataSource(object);
                        DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                        res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                        res.setResult(dataSourceMetaData);
                    } catch (Exception e) {
                        res.setResponseCode(ResponseCodes.JNDI_ERROR);
                        res.setResult(new ThrowableArtifact(e));
View Full Code Here

            } else if (object == null) {
                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource && object.getClass().getName().equals("org.apache.commons.dbcp.BasicDataSource")){
                try {
                    DbcpDataSource cf = new DbcpDataSource(object);
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                } catch (Exception e) {
                    res.setResponseCode(ResponseCodes.JNDI_ERROR);
                    res.setResult(new ThrowableArtifact(e));
View Full Code Here

                throw new NullPointerException("lookup of '" + name + "' returned null");
            } else if (object instanceof DataSource) {
                if (DataSourceFactory.knows(object)) {
                    try {
                        final DbcpDataSource cf = new DbcpDataSource(object);
                        final DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                        res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                        res.setResult(dataSourceMetaData);
                    } catch (Exception e) {
                        res.setResponseCode(ResponseCodes.JNDI_ERROR);
                        res.setResult(new ThrowableArtifact(e));
View Full Code Here

                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource) {
                if (isDbcpDataSource(object)) {
                    try {
                        DbcpDataSource cf = new DbcpDataSource(object);
                        DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                        res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                        res.setResult(dataSourceMetaData);
                    } catch (Exception e) {
                        res.setResponseCode(ResponseCodes.JNDI_ERROR);
                        res.setResult(new ThrowableArtifact(e));
View Full Code Here

                throw new NullPointerException("lookup of '" + name + "' returned null");
            } else if (object instanceof DataSource) {
                if (DataSourceFactory.knows(object)) {
                    try {
                        final DbcpDataSource cf = new DbcpDataSource(object);
                        final DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                        res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                        res.setResult(dataSourceMetaData);
                    } catch (final Exception e) {
                        res.setResponseCode(ResponseCodes.JNDI_ERROR);
                        res.setResult(new ThrowableArtifact(e));
View Full Code Here

            } else if (object == null) {
                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource && object.getClass().getName().equals("org.apache.commons.dbcp.BasicDataSource")){
                try {
                    DbcpDataSource cf = new DbcpDataSource(object);
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                } catch (Exception e) {
                    res.setResponseCode(ResponseCodes.JNDI_ERROR);
                    res.setResult(new ThrowableArtifact(e));
View Full Code Here

            } else if (object == null) {
                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource && object.getClass().getName().equals("org.apache.commons.dbcp.BasicDataSource")){
                try {
                    DbcpDataSource cf = new DbcpDataSource(object);
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                } catch (Exception e) {
                    res.setResponseCode(ResponseCodes.JNDI_ERROR);
                    res.setResult(new ThrowableArtifact(e));
View Full Code Here

            } else if (object == null) {
                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource && object.getClass().getName().equals("org.apache.commons.dbcp.BasicDataSource")){
                try {
                    DbcpDataSource cf = new DbcpDataSource(object);
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                } catch (Exception e) {
                    res.setResponseCode(ResponseCodes.JNDI_ERROR);
                    res.setResult(new ThrowableArtifact(e));
View Full Code Here

            } else if (object == null) {
                throw new NullPointerException("lookup of '"+name+"' returned null");
            } else if (object instanceof DataSource && object.getClass().getName().equals("org.apache.commons.dbcp.BasicDataSource")){
                try {
                    DbcpDataSource cf = new DbcpDataSource(object);
                    DataSourceMetaData dataSourceMetaData = new DataSourceMetaData(cf.getDriverClassName(), cf.getUrl(), cf.getUsername(), cf.getPassword());
                    res.setResponseCode(ResponseCodes.JNDI_DATA_SOURCE);
                    res.setResult(dataSourceMetaData);
                } catch (Exception e) {
                    res.setResponseCode(ResponseCodes.JNDI_ERROR);
                    res.setResult(new ThrowableArtifact(e));
View Full Code Here

TOP

Related Classes of org.apache.openejb.client.DataSourceMetaData

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.