Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Resources


    private void loadPool(com.sun.enterprise.config.serverbeans.JdbcResource jr)
            throws Exception {

        String poolName = jr.getPoolName();
        Resources resources = (Resources) jr.parent();
        ConfigBean cb = resources.getJdbcConnectionPoolByName(poolName);
        if (cb != null) {
            try {
                InitialContext ic = new InitialContext();
                ic.lookup(ConnectorAdminServiceUtils.
                                getReservePrefixedJNDINameForPool(poolName));
View Full Code Here


     * @since 8.1 pe/se/ee
     */
    private void checkAndDeletePool(com.sun.enterprise.config.serverbeans.JdbcResource
                    cr) throws Exception {
        String poolName = cr.getPoolName();
        Resources res = (Resources) cr.parent();
       
        try {
            boolean poolReferred =
                ResourcesUtil.createInstance().isJdbcPoolReferredInServerInstance(poolName);
            if (!poolReferred) {
                _logger.fine("Deleting JDBC pool " + poolName + "as there is no more " +
                        "resource-refs to the pool in this server instance");
                com.sun.enterprise.config.serverbeans.JdbcConnectionPool jcp
                                    = res.getJdbcConnectionPoolByName(poolName);
                //Delete/Undeploy Pool
                JdbcConnectionPoolDeployer deployer =
                        new JdbcConnectionPoolDeployer();
                deployer.actualUndeployResource(jcp);
            }
View Full Code Here

                   "Added connector resource in backend",jndiName);
    }

    private boolean checkEmbeddedRarStatus(ConnectorResource cr) {
        boolean result = true;
        Resources resources = (Resources) cr.parent();
        String poolName = cr.getPoolName();
        ConfigBean cb = resources.getConnectorConnectionPoolByName(poolName);
        com.sun.enterprise.config.serverbeans.ConnectorConnectionPool cp =
          (com.sun.enterprise.config.serverbeans.ConnectorConnectionPool)cb;

        if(cp != null){
            ResourcesUtil util = ResourcesUtil.createInstance();
View Full Code Here

    }

    private void loadPool(ConnectorResource cr) throws Exception {

        String poolName = cr.getPoolName();
        Resources resources = (Resources) cr.parent();
        ConfigBean cb = resources.getConnectorConnectionPoolByName(poolName);
        com.sun.enterprise.config.serverbeans.ConnectorConnectionPool cp =
          (com.sun.enterprise.config.serverbeans.ConnectorConnectionPool)cb;
        if (cb != null) {
          if (ConnectionPoolObjectsUtils.isPoolSystemPool(poolName)){
              createPool(cp);
View Full Code Here

     * @since 8.1 pe/se/ee
     */
    private void checkAndDeletePool(ConnectorResource cr) throws Exception {
        try {
            String poolName = cr.getPoolName();
            Resources res = (Resources) cr.parent();

            boolean poolReferred =
                ResourcesUtil.createInstance().isPoolReferredInServerInstance(poolName);
            if (!poolReferred) {
                _logger.fine("Deleting pool " + poolName + "as there is no more " +
                        "resource-refs to the pool in this server instance");
                com.sun.enterprise.config.serverbeans.ConnectorConnectionPool ccp
                                    = res.getConnectorConnectionPoolByName(poolName);
                //Delete/Undeploy Pool
                ConnectorConnectionPoolDeployer deployer =
                        new ConnectorConnectionPoolDeployer();
                deployer.undeployResource(ccp);
            }
View Full Code Here

               //rBean = ServerBeansFactory.getServerBean(ctx).getResources();
               rBean = ServerBeansFactory.getDomainBean(ctx).getResources();
               //RAMAKANTH
               if (rBean == null)
               {
                   rBean = new Resources();
               }
           } catch (ConfigException ce) {
/** IASRI 4660742
               ce.printStackTrace();
               System.out.println("Error initializing context");
View Full Code Here

   
    private void loadJdbcResource(PersistenceManagerFactoryResource cr)
                        throws Exception {

        String resName = cr.getJdbcResourceJndiName();
        Resources resources = (Resources) cr.parent();
        ConfigBean cb = resources.getJdbcResourceByJndiName(resName);
        if (cb != null) {
            try {
                InitialContext ic = new InitialContext();
                ic.lookup(resName);
            } catch (Exception e) {
View Full Code Here

    /**
    * Get the resources element from domain.xml.
    * return null if not found
    */   
    private Resources getResourcesBean() {
        Resources resourcesBean = null;
        Domain domainBean = null;
        ConfigContext configCtx = this.getConfigContext();
        try {
            domainBean = ServerBeansFactory.getDomainBean(configCtx);
            if(domainBean != null) {
View Full Code Here

    public JdbcConnectionPool getHadbJdbcConnectionPoolFromConfig() {
        String storePoolJndiName = this.getHaStorePoolJndiNameFromConfig();
        if(storePoolJndiName == null)
            return null;

        Resources resources = this.getResourcesBean();
        JdbcResource jdbcResource =
            resources.getJdbcResourceByJndiName(storePoolJndiName);
        if(jdbcResource == null) {
            return null;
        }
               
        String poolName = jdbcResource.getPoolName();
        JdbcConnectionPool pool =
            resources.getJdbcConnectionPoolByName(poolName);
        return pool;
    }
View Full Code Here

        String storePoolJndiName = this.getHaStorePoolJndiNameFromConfig();
        if(storePoolJndiName == null)
            return null;

        Resources resources = this.getResourcesBean();
        JdbcResource jdbcResource =
            resources.getJdbcResourceByJndiName(storePoolJndiName);
        if(jdbcResource == null)
            return null;
        String poolName = jdbcResource.getPoolName();
        return poolName;
    }   
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Resources

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.