public void closeMQMBeanServerConnection() throws ConnectorRuntimeException { try { if (connector != null) { connector.close(); } } catch (IOException e) { ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre; } } }
private DelegatingClassLoader.ClassFinder getLibrariesClassLoader(final List<URI> appLibs) throws MalformedURLException, ConnectorRuntimeException { try { return (DelegatingClassLoader.ClassFinder) AccessController.doPrivileged(new PrivilegedExceptionAction(){ public Object run() throws Exception { return clh.getAppLibClassFinder(appLibs); } }); } catch (PrivilegedActionException e) { _logger.log(Level.SEVERE, "error.creating.libraries.classloader", e); ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre; } }
private void handleException(Exception ex, EnvironmentProperty prop, Object bean) throws ConnectorRuntimeException { logger.log(Level.WARNING, "rardeployment.exception_on_invoke_setter", new Object[]{prop.getName(), getFilteredPropValue(prop), ex.getMessage()}); if (logger.isLoggable(Level.FINE)) { 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)); }
public PoolType getPoolType(PoolInfo poolInfo) throws ConnectorRuntimeException { ConnectorConnectionPool ccp; try { ccp = getConnectorConnectionPool(poolInfo); } catch (NamingException e) { ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre; } return getPoolType(ccp); }
cre.initCause(ne); _logger.log(Level.SEVERE, "rardeployment.connectorresource_removal_from_jndi_error", resourceInfo); _logger.log(Level.SEVERE, "", cre);
_logger.log(Level.SEVERE, "error.creating.connector.classloader", ex); ConnectorRuntimeException cre = new ConnectorRuntimeException(ex.getMessage()); cre.initCause(ex); throw cre;
cre.initCause(ne); _logger.log(Level.SEVERE, "rardeployment.admin_object_delete_failure", resourceInfo);
e.printStackTrace(); ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre;
ConnectorRuntimeException cre = new ConnectorRuntimeException( i18nMsg); cre.initCause(ne); if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "rardeployment.jndi_lookup_failed", ConnectorRuntimeException cre = new ConnectorRuntimeException( i18nMsg ); cre.initCause(ne); _logger.log(Level.SEVERE,"mcf_add_toregistry_failed",poolInfo); if (_logger.isLoggable( Level.FINE ) ) {
ConnectorRuntimeException cre = new ConnectorRuntimeException( "Failed to read the connector deployment descriptors"); cre.initCause(ex); _logger.log(Level.SEVERE, "rardeployment.connector_descriptor_read_error", moduleDir); _logger.log(Level.SEVERE, "", cre); ConnectorRuntimeException cre = new ConnectorRuntimeException( "Failed to parse the connector deployment descriptors"); cre.initCause(ex); _logger.log(Level.SEVERE, "rardeployment.connector_descriptor_parse_error", moduleDir); _logger.log(Level.SEVERE, "", cre);
public void loadDeferredResources(Resource[] resourcesToLoad) throws Exception { if (resourcesToLoad == null || resourcesToLoad.length == 0) { return; } for (Resource resource : resourcesToLoad) { if (resource == null) { continue; } else if (getResourcesUtil().isEnabled(resource)) { try { _runtime.getResourceDeployer(resource).deployResource(resource); } catch (Exception e) { ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre; } } } }
cre.initCause(e); throw cre;
ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg); cre.initCause(ne); _logger.log(Level.SEVERE, "rardeployment.connectionpool_removal_from_jndi_error",
logger.log(Level.SEVERE, RAR_THREAD_POOL_NOT_FOUND, new Object[]{threadPoolId, raName}); ConnectorRuntimeException cre = new ConnectorRuntimeException(e.getMessage()); cre.initCause(e); throw cre;
/** * create an empty connection pool * * @param poolInfo pool to be created * @param pt type of pool * @throws ConnectorRuntimeException */ private void createAndAddPool(PoolInfo poolInfo, PoolType pt, Hashtable env) throws ConnectorRuntimeException { PoolManager poolMgr = _runtime.getPoolManager(); try { poolMgr.createEmptyConnectionPool(poolInfo, pt, env); } catch (PoolingException pe) { String i18nMsg = localStrings.getString("ccp_adm.failed_to_create_pool_object"); ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg); cre.initCause(pe); throw cre; } }
/** * Loads RA javabean. This method is protected, so that any system * resource adapter can have specific configuration done during the * loading. * * @throws ConnectorRuntimeException if there is a failure. */ protected void loadRAConfiguration() throws ConnectorRuntimeException { try { Set mergedProps; ConnectorRegistry registry = ConnectorRegistry.getInstance(); ResourceAdapterConfig raConfig = registry.getResourceAdapterConfig(moduleName_); List<Property> raConfigProps = new ArrayList<Property>(); mergedProps = mergeRAConfiguration(raConfig, raConfigProps); logMergedProperties(mergedProps); SetMethodAction setMethodAction = new SetMethodAction(this.resourceadapter_, mergedProps); setMethodAction.run(); } catch (Exception e) { String i18nMsg = localStrings.getString("ccp_adm.wrong_params_for_create", e.getMessage()); ConnectorRuntimeException cre = new ConnectorRuntimeException(i18nMsg); cre.initCause(e); throw cre; } }
public void loadDeferredResourceAdapter(String rarModuleName) throws ConnectorRuntimeException { //load the RA if its not already loaded if (_registry.getActiveResourceAdapter(rarModuleName) == null) { try { //Do this only for System RA if (ConnectorsUtil.belongsToSystemRA(rarModuleName)) { String systemModuleLocation = ConnectorsUtil.getSystemModuleLocation(rarModuleName); if(_runtime.isServer()){ _runtime.getMonitoringBootstrap().registerProbes(rarModuleName, new File(systemModuleLocation), _runtime.getSystemRARClassLoader(rarModuleName)); } _runtime.createActiveResourceAdapter(systemModuleLocation, rarModuleName, null); } /* not needed as long as standalone + embedded rars are loaded before recovery else if (rarModuleName.indexOf(ConnectorConstants.EMBEDDEDRAR_NAME_DELIMITER) != -1) { createActiveResourceAdapterForEmbeddedRar(rarModuleName); } else{ _runtime.createActiveResourceAdapter(ConnectorsUtil.getLocation(rarModuleName), rarModuleName, null); }*/ } catch (Exception e) { ConnectorRuntimeException ce = new ConnectorRuntimeException(e.getMessage()); ce.initCause(e); throw ce; } } }
/** * Rebinds the connection pool with matchning flag set. * * @param poolInfo pool for which matching need to be switched on * @throws ConnectorRuntimeException , if a Naming error occurs. */ public void switchOnMatching(PoolInfo poolInfo) throws ConnectorRuntimeException { try { ConnectorConnectionPool origCcp = getOriginalConnectorConnectionPool(poolInfo); origCcp.setMatchConnections(true); //now rebind the object in jndi String jndiNameForPool = ConnectorAdminServiceUtils.getReservePrefixedJNDINameForPool(poolInfo); _runtime.getResourceNamingService().unpublishObject(poolInfo, jndiNameForPool); _runtime.getResourceNamingService().publishObject(poolInfo, jndiNameForPool, origCcp, true); } catch (NamingException e) { ConnectorRuntimeException ex = new ConnectorRuntimeException(e.getMessage()); throw(ConnectorRuntimeException) ex.initCause(e); } }