Package org.apache.openejb.resource.jdbc

Examples of org.apache.openejb.resource.jdbc.JdbcConnectionFactory


                for (Binding binding : Collections.list(bindings)) {
                    Object value = binding.getObject();
                    if (value instanceof ConnectorReference) {
                        Object connectionFactory = ((ConnectorReference)value).getObject();
                        if (connectionFactory instanceof JdbcConnectionFactory) {
                            JdbcConnectionFactory jdbc = (JdbcConnectionFactory) connectionFactory;
                            String path = getPath(jdbc);
                            if (path != null) {
                                if (dbIndex > 9) {
                                    throw new ServiceException("Hsql Server can only host 10 database connections");
                                }
View Full Code Here


                    res.setResponseCode(ResponseCodes.JNDI_CONTEXT);
                    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

TOP

Related Classes of org.apache.openejb.resource.jdbc.JdbcConnectionFactory

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.