Examples of JDBCResourceConfig


Examples of com.sun.appserv.management.config.JDBCResourceConfig

       
        if (domainRoot == null) {
            throw new IllegalStateException("domainRoot is uninitialised");
        }
       
        JDBCResourceConfig jdbcResourceConfig = findJdbcResourceConfig(
                resourceName);
        if (jdbcResourceConfig != null) {
            jdbcResourceConfig.setEnabled(enabled);
            return;
        }
        
        if (connectionPoolName == null) {
            throw new IllegalArgumentException("connectionPoolName parameter "
View Full Code Here

Examples of com.sun.appserv.management.config.JDBCResourceConfig

    }
   
         public static JDBCResourceConfig
  ensureDefaultInstance( final DomainConfig domainConfig )
  {
      JDBCResourceConfig   result  =
          domainConfig.getJDBCResourceConfigMap().get( getDefaultInstanceName() );
     
      if ( result == null )
      {
          final JDBCConnectionPoolConfig  pool =
View Full Code Here

Examples of com.sun.appserv.management.config.JDBCResourceConfig

    protected final AMXConfig
  createProgeny(final String name, final Map<String,String> options )
  {
    mPool  = createPool( name + "-temppool" );
   
      final JDBCResourceConfig  config  =
        getDomainConfig().createJDBCResourceConfig( name, mPool.getName(), options);
    assert( config != null );
         
    addReference( config );
View Full Code Here

Examples of com.sun.appserv.management.config.JDBCResourceConfig

        if (GuiUtil.isEmpty(jndiName)){
            //for creating JDBC,this will be empty.
            handlerCtx.setOutputValue("enabled", Boolean.TRUE);
            return;
        }
  JDBCResourceConfig jdbc = AMXUtil.getDomainConfig().getJDBCResourceConfigMap().get(jndiName);
  if (jdbc == null){
      GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchJDBCResource"));
  }else{
      handlerCtx.setOutputValue("poolName", jdbc.getPoolName());
      handlerCtx.setOutputValue("description", jdbc.getDescription());
            if(AMXUtil.isEE())
                handlerCtx.setOutputValue("enabledString", TargetUtil.getEnabledStatus(jdbc, false));
            else
                handlerCtx.setOutputValue("enabled", TargetUtil.isResourceEnabled(jdbc, "server" ));
  }
View Full Code Here

Examples of com.sun.appserv.management.config.JDBCResourceConfig

    public static void saveJdbc(HandlerContext handlerCtx) {
        String jndiName = (String) handlerCtx.getInputValue("jndiName");
        String poolName = (String) handlerCtx.getInputValue("poolName");
        Boolean edit = (Boolean) handlerCtx.getInputValue("edit");
       
        JDBCResourceConfig jdbc = null;
       
        try{
            if (edit){
                 jdbc = AMXUtil.getDomainConfig().getJDBCResourceConfigMap().get(jndiName);
                if (jdbc == null){
        GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchJDBCResource"));
                    return;
                }
                jdbc.setPoolName(poolName);
                if(!AMXUtil.isEE()){
                    Boolean enabled = (Boolean) handlerCtx.getInputValue("enabled");
                    TargetUtil.setResourceEnabled(jdbc, "server", enabled);
                }
                GuiUtil.prepareSuccessful(handlerCtx);
            }else{
                 jdbc = AMXUtil.getDomainConfig().createJDBCResourceConfig(jndiName, poolName, null);
                 JavaMailHandlers.createNewTargets(handlerCtx,  jndiName);
            }
            jdbc.setDescription((String)handlerCtx.getInputValue("description"));
           
        }catch (Exception ex){
      GuiUtil.handleException(handlerCtx, ex);
        }
    }
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.