Package com.sun.appserv.connectors.internal.api

Examples of com.sun.appserv.connectors.internal.api.ConnectorRuntimeException


                    _logger.log(Level.FINE, "rardeployment.connectorresource_removal_from_jndi_error", resourceInfo);
                    _logger.log(Level.FINE, "", ne);
                }
                return;
            }
            ConnectorRuntimeException cre = new ConnectorRuntimeException
                    ("Failed to delete connector resource from jndi");
            cre.initCause(ne);
            _logger.log(Level.SEVERE, "rardeployment.connectorresource_removal_from_jndi_error", resourceInfo);
            _logger.log(Level.SEVERE, "", cre);
            throw cre;
        }finally{
            _registry.removeResourceInfo(resourceInfo);
View Full Code Here


            } catch (NamingException ne) {
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "Failed to look up ConnectorDescriptor "
                            + "from JNDI", moduleName);
                }
                throw new ConnectorRuntimeException("Failed to look up " +
                        "ConnectorDescriptor from JNDI");
            }
            runtime.createActiveResourceAdapter(connectorDescriptor, moduleName, null);
        }
View Full Code Here

            ManagedConnectionFactory mcf = getRuntime().obtainManagedConnectionFactory(poolInfo, env);
            if (mcf == null) {
                if(_logger.isLoggable(Level.FINE)) {
                    _logger.log(Level.FINE, "Failed to create MCF ", poolInfo);
                }
                throw new ConnectorRuntimeException("Failed to create MCF");
            }

            boolean forceNoLazyAssoc = false;

            String jndiName = name.toString();
View Full Code Here

    }

    private AdminObject getAdminObject(ConnectorDescriptor desc, String adminObjectInterface, String adminObjectClass)
            throws ConnectorRuntimeException {
        if (desc == null || adminObjectInterface == null ) {
            throw new ConnectorRuntimeException("Invalid arguments");
        }

        Set adminObjectSet = desc.getAdminObjects();
        if (adminObjectSet == null || adminObjectSet.size() == 0) {
            return null;
        }
        AdminObject adminObject = null;
        Iterator iter = adminObjectSet.iterator();
        Properties mergedVals = null;
        boolean adminObjectFound = false;
        while (iter.hasNext()) {
            adminObject = (AdminObject) iter.next();
            if (adminObjectInterface.equals(adminObject.getAdminObjectInterface()) &&
                    (adminObjectClass == null || adminObjectClass.equals(adminObject.getAdminObjectClass()))) {
                adminObjectFound = true;
                break;
            }
        }

        if (!adminObjectFound) {
            StringManager localStrings =
                    StringManager.getManager(AdminObjectConfigParserImpl.class);
            String msg = localStrings.getString(
                    "no_adminobject_interface_found_in_raxml", adminObjectInterface);
            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, msg);
            }
            throw new ConnectorRuntimeException(msg);
        }
        return adminObject;
    }
View Full Code Here

     */
    public String[] getAdminObjectInterfaceNames(ConnectorDescriptor desc)
            throws ConnectorRuntimeException {

        if (desc == null) {
            throw new ConnectorRuntimeException("Invalid arguments");
        }

        Set adminObjectSet = desc.getAdminObjects();
        if (adminObjectSet == null || adminObjectSet.size() == 0) {
            return null;
View Full Code Here

     */
    public String[] getAdminObjectClassNames(ConnectorDescriptor desc, String intfName)
            throws ConnectorRuntimeException {

        if (desc == null) {
            throw new ConnectorRuntimeException("Invalid arguments");
        }

        Set adminObjectSet = desc.getAdminObjects();
        if (adminObjectSet == null || adminObjectSet.size() == 0) {
            return null;
View Full Code Here

     * {@inheritDoc}
     */
    public boolean hasAdminObject(ConnectorDescriptor desc, String intfName, String className)
            throws ConnectorRuntimeException {
        if (desc == null || intfName == null || className == null) {
            throw new ConnectorRuntimeException("Invalid arguments");
        }

        Set adminObjectSet = desc.getAdminObjects();
        if (adminObjectSet == null || adminObjectSet.size() == 0) {
            return false;
View Full Code Here

    }

    public List<String> getConfidentialProperties(ConnectorDescriptor desc, String rarName, String... keyFields)
            throws ConnectorRuntimeException {
        if(keyFields == null || keyFields.length == 0 || keyFields[0] == null){
            throw new ConnectorRuntimeException("adminObjectInterface must be specified");
        }
        String interfaceName = keyFields[0];
        String className = null;

        if(keyFields.length > 1){
View Full Code Here

            logger.log(Level.FINE, "Exception while trying to set "
                    + prop.getName() + " and value " + getFilteredPropValue(prop),
                    ex + " on an instance of " + bean.getClass());
        }
        throw(ConnectorRuntimeException)
                (new ConnectorRuntimeException(ex.getMessage()).initCause(ex));
    }
View Full Code Here

        if(connectorPoolObj == null) {
            if(_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "Wrong parameters for pool creation ");
            }
            String i18nMsg = localStrings.getString("ccp_adm.wrong_params_for_create");
            throw new ConnectorRuntimeException(i18nMsg);
        }
        PoolInfo poolInfo = connectorPoolObj.getPoolInfo();
        String jndiNameForPool = ConnectorAdminServiceUtils.getReservePrefixedJNDINameForPool(poolInfo);
        try {

            _runtime.getResourceNamingService().publishObject(poolInfo, jndiNameForPool, connectorPoolObj, true);
            ManagedConnectionFactory mcf = obtainManagedConnectionFactory(poolInfo);
            if (mcf == null) {
                _runtime.getResourceNamingService().unpublishObject(poolInfo, jndiNameForPool);
                String i18nMsg = localStrings.getString("ccp_adm.failed_to_create_mcf", poolInfo);
                ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg);
                _logger.log(Level.SEVERE, "rardeployment.mcf_creation_failure", poolInfo);
                _logger.log(Level.SEVERE, "", cre);
                throw cre;
            }

        } catch (NamingException ex) {

            String i18nMsg = localStrings.getString("ccp_adm.failed_to_publish_in_jndi", poolInfo);
            ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg);
            cre.initCause(ex);
            _logger.log(Level.SEVERE, "rardeployment.pool_jndi_bind_failure", poolInfo);
            _logger.log(Level.SEVERE, "", cre);
            throw cre;
        } catch (NullPointerException ex) {
            try {
                _runtime.getResourceNamingService().unpublishObject(poolInfo, jndiNameForPool);
            } catch (NamingException ne) {
                if(_logger.isLoggable(Level.FINE)) {
                    _logger.log(Level.FINE, "Failed to unbind connection pool object  ", poolInfo);
                }
            }

            String i18nMsg = localStrings.getString("ccp_adm.failed_to_register_mcf", poolInfo);
            ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg);
            cre.initCause(ex);
            _logger.log(Level.SEVERE, "rardeployment.mcf_registration_failure", poolInfo);
            _logger.log(Level.SEVERE, "", cre);
            throw cre;
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.appserv.connectors.internal.api.ConnectorRuntimeException

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.