Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.resource.metadata.mcf;
 
 import java.util.List;
 
 
A ManagedConnectionFactoryDeployment.

Author(s):
Weston Price
Version:
$Revision: 1.1 $
 
 {
   
The serialVersionUID
 
    private static final long serialVersionUID = -4591557831734316580L;

   
The jndiName
    
    @XmlElement(name="jndi-name")
    private String jndiName;   
   
   
The rarName
 
    @XmlElement(name="rar-name")
    private String rarName;
   
   
The useJavaContext
 
    @XmlElement(name="use-java-context")
    private boolean useJavaContext = true;   
   
   
The connectionDefinition
 
    @XmlElement(name="connection-definition")
    protected String connectionDefinition;

   
The jmxInvokerName
 
    @XmlElement(name="jmx-invoker-name")
    private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
    
    @XmlElement(name="min-pool-size")
    private int minSize = 0;
    
    @XmlElement(name="max-pool-size")
    private int maxPoolSize = 10;
    
    @XmlElement(name="blocking-timeout-millis")
    private long blockingTimeout = 30000;
    
    @XmlElement(name="idle-timeout-minutes")
    private int idleTimeout = 30;
    
    @XmlElement(name="prefill")
    private Boolean prefill = .;
    
   @XmlElement(name="background-validation")
   private boolean backgroundValidation;
   
   @XmlElement(name="background-validation-millis")
   private long backgroundValidationMillis;
   @XmlElement(name="validate-on-match")
   private boolean validateOnMatch = true;
   
   @XmlElement(name="use-strict-min")
   private Boolean useStrictMin = .;
   @XmlElement(name="no-tx-separate-pools")
   
   @XmlElement(name="statistics-formatter")
   private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
   
   @XmlElement(name="isSameRM-override-value")
   // is always true now and left here for the xml binding
   @XmlElement(name="track-connection-by-tx")
   @XmlElement(name="interleaving")
   private Boolean interleaving;
   @XmlElement(name="allocation-retry")
   private int allocationRetry = 0;
   
   @XmlElement(name="allocation-retry-wait-millis")
   private long allocationRetryWaitMillis = 5000;
   
   
The transactionSupportMetaData
The managedConnectionFactoryProperties
   @XmlElement(name="config-property")
The securityMetaData
   @XmlElements({@XmlElement(name="security-domain", type=SecurityDomainMetaData.class), @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
      
   @XmlElement(name="depends")
   private List<StringdependsNames = new ArrayList<String>();
   
   @XmlElement(name="metadata")
   private DBMSMetaData dbmsMetaData;
   // todo: this should be wrapped into <metadata> element
   @XmlElement(name="type-mapping")
   String typeMapping;
   
   
The localTransactions
   @XmlElement(name="local-transaction")
   {
      this. = .;
   }
   
   
Get the connectionDefinition.

Returns:
the connectionDefinition.
   @ManagementProperty(name="connection-definition",
         includeInTemplate=true)
   {
      return ;
   }

   
Set the connectionDefinition.

Parameters:
connectionDefinition The connectionDefinition to set.
   public void setConnectionDefinition(String connectionDefinition)
   {
      this. = connectionDefinition;
   }

   
Get the jndiName. This is the id for the DataSource ManagedObject.

Returns:
the jndiName.
   @ManagementProperty(name="jndi-name",
         description="The global JNDI name to bind the factory under",
         includeInTemplate=true)
   @ManagementObjectID(type="DataSource")
   public String getJndiName()
   {
      return ;
   }

   
Set the jndiName.

Parameters:
jndiName The jndiName to set.
   public void setJndiName(String jndiName)
   {
      this. = jndiName;
   }

   
Get the transactionSupportMetaData.

Returns:
the transactionSupportMetaData.
   @ManagementProperty(ignored=true)
   {
      return ;
   }

   
Set the transactionSupportMetaData.

Parameters:
transactionSupportMetaData The transactionSupportMetaData to set.
   {
      this. = transactionSupportMetaData;
   }

   
Get the useJavaContext.

Returns:
the useJavaContext.
   @ManagementProperty(name="use-java-context",
         description="Should the jndi name be bound under the java: context",
         includeInTemplate=true)
   public boolean isUseJavaContext()
   {
      return ;
   }

   
Set the useJavaContext.

Parameters:
useJavaContext The useJavaContext to set.
   public void setUseJavaContext(boolean useJavaContext)
   {
      this. = useJavaContext;
   }

   
Get the managedConnectionFactoryProperties.

Returns:
the managedConnectionFactoryProperties.
   @ManagementProperty(name="config-property", managed=true, includeInTemplate=true)
   {
   }

   
Set the managedConnectionFactoryProperties.

Parameters:
managedConnectionFactoryProperties The managedConnectionFactoryProperties to set.
         List<ManagedConnectionFactoryPropertyMetaDatamanagedConnectionFactoryProperties)
   {
      this. = managedConnectionFactoryProperties;
   }

   
Get the rarName.

Returns:
the rarName.
   @ManagementProperty(name="rar-name")
   public String getRarName()
   {
      return ;
   }

   
Set the rarName.

Parameters:
rarName The rarName to set.
   public void setRarName(String rarName)
   {
      this. = rarName;
   }

   
Get the securityMetaData.

Returns:
the securityMetaData.
   @ManagementProperty(name="security-domain", managed=true, includeInTemplate=true)
   {
      return ;
   }

   
Set the securityMetaData.

Parameters:
securityMetaData The securityMetaData to set.
   public void setSecurityMetaData(SecurityMetaData securityMetaData)
   {
      this. = securityMetaData;
   }

   
   
Get the typeMapping.

Returns:
the typeMapping.
   @ManagementProperty(name="type-mapping", includeInTemplate=true)
   public String getTypeMapping()
   {
      return ;
   }

   
Set the typeMapping.

Parameters:
typeMapping The typeMapping to set.
   public void setTypeMapping(String typeMapping)
   {
      this. = typeMapping;
   }

   
Get the jmxInvokerName.

Returns:
the jmxInvokerName.
   @ManagementProperty(name="jmx-invoker-name")
   @ManagementObjectRef(type="JMXInvoker")
   public String getJmxInvokerName()
   {
      return ;
   }

   
Set the jmxInvokerName.

Parameters:
jmxInvokerName The jmxInvokerName to set.
   public void setJmxInvokerName(String jmxInvokerName)
   {
      this. = jmxInvokerName;
   }

   
Get the dependsNames.

Returns:
the dependsNames.
   @ManagementProperty(name="depends", ignored=true)
   public List<StringgetDependsNames()
   {
      return ;
   }

   
Set the dependsNames.

Parameters:
dependsNames The dependsNames to set.
   public void setDependsNames(List<StringdependsNames)
   {
      this. = dependsNames;
   }

   
Get the dependsServices.

Returns:
the dependsServices.
   @ManagementProperty(name="services", ignored=true)
   {
      return ;
   }

   
Set the dependsServices.

Parameters:
dependsServices The dependsServices to set.
   public void setDependsServices(List<ServiceMetaDatadependsServices)
   {
      this. = dependsServices;
   }
   
   @ManagementProperty(name="min-pool-size", includeInTemplate=true)
   public void setMinSize(int minSize)
   {
      this. = minSize;
   } 
   
   public int getMinSize()
   {
      return this.;
   }
   
   @ManagementProperty(name="max-pool-size", includeInTemplate=true)
   public void setMaxSize(int maxSize)
   {
      this. = maxSize;
   }
   
   public int getMaxSize()
   {
      if (this. >= this.)
      {
         return this.;
      } else {
         return this.;
      }
   }
   
   @ManagementProperty(name="blocking-timeout-millis", includeInTemplate=true)
   public void setBlockingTimeoutMilliSeconds(long blockTimeout)
   {
     this. = blockTimeout;
   }
   
   public long getBlockingTimeoutMilliSeconds()
   {
      return this.;
   }
   
   @ManagementProperty(name="idle-timeout-minutes", includeInTemplate=true)
   public void setIdleTimeoutMinutes(int idleTimeout)
   {
      this. = idleTimeout;
   }
   
   public int getIdleTimeoutMinutes()
   {
      return this.;
   }
   @ManagementProperty(name="prefill", includeInTemplate=true)
   public void setPrefill(Boolean prefill)
   {
      this. = prefill;
   }
   public Boolean getPrefill()
   {
      return this.;      
   }
   @ManagementProperty(name="background-validation", includeInTemplate=true)
   public boolean isBackgroundValidation()
   {
      return ;
   }
   public void setBackgroundValidation(boolean backgroundValidation)
   {
      this. = backgroundValidation;
   }
   public void setBackgroundValidationMillis(long interval)
   {
      this. = interval;
   }
   @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
   public long getBackgroundValidationMillis()
   {
      return this.;
   }
   public void setValidateOnMatch(boolean validateOnMatch)
   {
      this. = validateOnMatch;
   }
   @ManagementProperty(name="validate-on-match", includeInTemplate=true)
   public boolean isValidateOnMatch()
   {
      return this.;
   }
   @ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
   {
      return ;
   }
   public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
   {
      this. = isSameRMOverrideValue;
   }
   @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
   {
      return !isInterleaving();
   }
   public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
   {
      if(. == getLocalTransactions() && !..equals(trackConnectionByTransaction))
         throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");      
      setInterleaving(!..equals(trackConnectionByTransaction));
   }
   @ManagementProperty(name="interleaving", includeInTemplate=true)
   public Boolean isInterleaving()
   {
   }
   public void setInterleaving(Boolean interleaving)
   {
      this. = interleaving;
   }
   @ManagementProperty(name="allocation-retry", includeInTemplate=true)
   public int getAllocationRetry()
   {
      return this.;
   }
   
   public void setAllocationRetry(int ar)
   {
      this. = ar;
   } 
   
   @ManagementProperty(name="allocation-retry-wait-millis", includeInTemplate=true)
   public long getAllocationRetryWaitMillis()
   {
      return this.;
   }
   
   public void setAllocationRetryWaitMillis(long arwm)
   {
      this. = arwm;
   } 
   
   @ManagementProperty(name="local-transaction", use={.})
   {
      return ;
   }
   public void setLocalTransactions(Boolean localTransactions)
   {
      this. = localTransactions;
   }
   @ManagementProperty(name="use-strict-min", includeInTemplate=true)
   public Boolean getUseStrictMin()
   {
      return ;
   }
   public void setUseStrictMin(Boolean useStrictMin)
   {
      this. = useStrictMin;
   }
   @ManagementProperty(name="statistics-formatter", includeInTemplate=true)
   {
      return ;
   }
   public void setStatisticsFormatter(String statisticsFormatter)
   {
      this. = statisticsFormatter;
   }
   
   @ManagementProperty(name="no-tx-separate-pools", includeInTemplate=true)
   {
      return this.;
   }
   public void setNoTxSeparatePools(Boolean notxpool)
   {
      this. = notxpool;
   }
   @ManagementProperty(name="metadata", includeInTemplate=true)
   {
      return ;
   }
   public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
   {
      this. = dbmsMetaData;
   }
New to GrepCode? Check out our FAQ X