Examples of ConnectorRuntime


Examples of com.sun.enterprise.connectors.ConnectorRuntime

        if (listener != null)
            listener.poolDestroyed(poolName);
           
      //--Monitoring
      try {
          ConnectorRuntime runtime = ConnectorRuntime.getRuntime();
         
          if ( runtime.getEnviron() == ConnectorConstants.SERVER ) {
              final String fPoolName = poolName;
              if (isJdbcPool( fPoolName )) {
                  disableJDBCPoolMonitoring(fPoolName);
              } else {
                  disableConnectorConnectionPoolMonitoring(fPoolName);
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

       
        com.sun.enterprise.config.serverbeans.JdbcConnectionPool jdbcConnPool =
      (com.sun.enterprise.config.serverbeans.JdbcConnectionPool) resource;

  String poolName = jdbcConnPool.getName();
  ConnectorRuntime runtime = ConnectorRuntime.getRuntime();
  runtime.deleteConnectorConnectionPool( poolName );
  if ( _logger.isLoggable( Level.FINEST ) ) {
      _logger.finest("Pool Undeployed");
  }
    }
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

      throw new ConnectorRuntimeException("Unable to create ConnectorConnectionPool"+
              "from JDBC connection pool");
  }

  //now do internal book keeping
  ConnectorRuntime runtime = ConnectorRuntime.getRuntime();
  HashSet excludes = new HashSet();
  //add MCF config props to the set that need to be excluded
  //in checking for the equality of the props with old pool
  excludes.add( "TransactionIsolation");
  excludes.add( "GuaranteeIsolationLevel");
  excludes.add( "ValidationTableName");
  excludes.add( "ConnectionValidationRequired");
  excludes.add( "ValidationMethod");
  excludes.add( "StatementWrapping");
  excludes.add( "StatementTimeout");


    try {
      _logger.finest("Calling reconfigure pool");
      boolean poolRecreateRequired =
          runtime.reconfigureConnectorConnectionPool(connConnPool,
            excludes);
      if ( poolRecreateRequired ) {
         _logger.finest("Pool recreation required");   
         runtime.recreateConnectorConnectionPool( connConnPool );
         _logger.finest("Pool recreation done");   
      }
  } catch( ConnectorRuntimeException cre ) {
      cre.printStackTrace();
        throw cre;
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

     */
    public synchronized void deployResource(Object resource) throws Exception {

        final AdminObjectResource aor =
           (com.sun.enterprise.config.serverbeans.AdminObjectResource)resource;
        final ConnectorRuntime crt = ConnectorRuntime.getRuntime();
       
        if (aor.isEnabled()) {
            //registers the jsr77 object for the mail resource deployed
            final ManagementObjectManager mgr =
                getAppServerSwitchObject().getManagementObjectManager();
            mgr.registerAdminObjectResource(aor.getJndiName(),
                aor.getResAdapter(), aor.getResType(),
                getPropNamesAsStrArr(aor.getElementProperty()),
                getPropValuesAsStrArr(aor.getElementProperty()));
        } else {
                _logger.log(Level.INFO, "core.resource_disabled",
                        new Object[] {aor.getJndiName(),
                        IASJ2EEResourceFactoryImpl.JMS_RES_TYPE});
        }
       
        _logger.log(Level.FINE,
            "Calling backend to add adminObject",aor.getJndiName());
        crt.addAdminObject(null,aor.getResAdapter(),aor.getJndiName(),
                aor.getResType(),transformProps(aor.getElementProperty()));
        _logger.log(Level.FINE,
            "Added adminObject in backend",aor.getJndiName());
    }
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

    public synchronized void undeployResource(Object resource)
                        throws Exception {

        final AdminObjectResource aor =
           (com.sun.enterprise.config.serverbeans.AdminObjectResource)resource;
        final ConnectorRuntime crt = ConnectorRuntime.getRuntime();
       
        _logger.log(Level.FINE,
                   "Calling backend to delete adminObject",aor.getJndiName());
        crt.deleteAdminObject(aor.getJndiName());
        _logger.log(Level.FINE,
                   "Deleted adminObject in backend",aor.getJndiName());
       
        //unregister the managed object
        final ManagementObjectManager mgr =
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

     * @return    true if the connector loaded properly
     */
    //START OF IASRI 4686190
    boolean load() {
        try{
           ConnectorRuntime cr = ConnectorRuntime.getRuntime();
           cr.initialize(ConnectorRuntime.SERVER);
           cr.createActiveResourceAdapter(this.configManager.getLocation(this.id),this.id);
           return true;
        }catch(ConfigException e){
            _logger.log(Level.WARNING,"loader.configexception",e);
            return false;
        }
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

     * Unloads stand alone connector module.
     *
     * @return    true if removed successful
     */
    boolean unload() {
           ConnectorRuntime connectorRuntime = ConnectorRuntime.getRuntime();
           try {
               connectorRuntime.destroyActiveResourceAdapter(this.id,cascade);
               configManager.unregisterDescriptor(id);
           }
           catch(ConnectorRuntimeException cre) {
              return false;
           }
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

         
      
        final ConnectorConnectionPool ccp =
            getConnectorConnectionPool(domainCcp);
        final String defName = domainCcp.getConnectionDefinitionName();
        final ConnectorRuntime crt = ConnectorRuntime.getRuntime();
       
        if (domainCcp.isEnabled()) {
            if (UNIVERSAL_CF.equals(defName) || QUEUE_CF.equals(defName) || TOPIC_CF.equals(defName)) {
            //registers the jsr77 object for the mail resource deployed
            final ManagementObjectManager mgr =
                getAppServerSwitchObject().getManagementObjectManager();
            mgr.registerJMSResource(domainCcp.getName(), defName, null, null,
                    getPropNamesAsStrArr(domainCcp.getElementProperty()),
                    getPropValuesAsStrArr(domainCcp.getElementProperty()));
            }
           
        } else {
                _logger.log(Level.INFO, "core.resource_disabled",
                        new Object[] {domainCcp.getName(),
                        IASJ2EEResourceFactoryImpl.CONNECTOR_CONN_POOL_TYPE});
        }

        _logger.log(Level.FINE,
                   "Calling backend to add connectorConnectionPool",
                   domainCcp.getResourceAdapterName());
        crt.createConnectorConnectionPool(ccp,
            defName, domainCcp.getResourceAdapterName(),
            domainCcp.getElementProperty(),
            domainCcp.getSecurityMap());
       _logger.log(Level.FINE,
                   "Added connectorConnectionPool in backend",
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

        _logger.fine("ConnectorConnectionPoolDeployer : undeployResource : " );
        final com.sun.enterprise.config.serverbeans.ConnectorConnectionPool
        domainCcp =
        (com.sun.enterprise.config.serverbeans.ConnectorConnectionPool)resource;
        final String poolName = domainCcp.getName();
        final ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        final String defName = domainCcp.getConnectionDefinitionName();
       
        _logger.log(Level.FINE,
                 "Calling backend to delete ConnectorConnectionPool",poolName);
        crt.deleteConnectorConnectionPool(poolName);
        _logger.log(Level.FINE,
                   "Deleted ConnectorConnectionPool in backend",poolName);
       
        //unregister the managed object
        if (QUEUE_CF.equals(defName) || TOPIC_CF.equals(defName)) {
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorRuntime

        com.sun.enterprise.config.serverbeans.ConnectorConnectionPool
        domainCcp =
        (com.sun.enterprise.config.serverbeans.ConnectorConnectionPool)resource;
        SecurityMap[] securityMaps = domainCcp.getSecurityMap();     
        String poolName = domainCcp.getName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
       
        //Since 8.1 PE/SE/EE, only if pool has already been deployed in this
        //server-instance earlier, reconfig this pool
        if (!crt.isConnectorConnectionPoolDeployed(poolName)) {
            _logger.fine("The connector connection pool " + poolName
                            + " is either not referred or not yet created in "
                            + "this server instance and pool and hence "
                            + "redeployment is ignored");
            return;
        }
       

        String rarName = domainCcp.getResourceAdapterName();
        String connDefName = domainCcp.getConnectionDefinitionName();
        ElementProperty[] props = domainCcp.getElementProperty();
        ConnectorConnectionPool ccp = getConnectorConnectionPool(domainCcp);
        populateConnectorConnectionPool( ccp, connDefName, rarName, props,
          securityMaps);
 
        boolean poolRecreateRequired = false;
        try
            _logger.fine("Calling reconfigure pool");
                poolRecreateRequired = crt.reconfigureConnectorConnectionPool( ccp,
                new HashSet())
        } catch (ConnectorRuntimeException cre ) {
            cre.printStackTrace();
        }
       
        if (poolRecreateRequired){
            _logger.fine("Pool recreation required");   
            crt.recreateConnectorConnectionPool( ccp );
            _logger.fine("Pool recreation done");   
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.