Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlai.common
Class ConnectionFactoryDescriptor

    java.lang.Object
      |
      +--com.bea.wlai.common.AbstractDescriptor
            |
            +--com.bea.wlai.common.AbstractPropertiedDescriptor
                  |
                  +--com.bea.wlai.common.ConnectionFactoryDescriptor

public class ConnectionFactoryDescriptor
extends AbstractPropertiedDescriptor
implements IConnectionFactoryDescriptor

An implementation of the IConnectionFactoryDescriptor interface for use by the WLAI server.

Author:
  Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
  Serialized Form

Constructor Summary
`ConnectionFactoryDescriptor(java.lang.String name, java.lang.String jndiName, java.lang.String description, java.lang.String adapterLogicalName, int minPoolSize, int maxPoolSize, boolean allowPoolToShrink)` Construct a new ServiceDescriptor with the given name, description, interaction spec class name, and request/response document descriptors.
`ConnectionFactoryDescriptor(java.lang.String name, java.lang.String jndiName, java.lang.String description, java.lang.String adapterLogicalName, int minPoolSize, int maxPoolSize, float targetFractionOfMaxPoolSize, boolean allowPoolToShrink)` Deprecated. targetFractionOfMaxPoolSize is no longer supported

Method Summary
`boolean` | `equals(java.lang.Object obj)` Compare this object to the given object and determine if they are equal.
`void` | `fromXML(IDocument doc)` Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.
`java.lang.String` | `getAdapterLogicalName()` Get the logical name of the adapter that will be associated with connection pools based off this descriptor.
`java.lang.String` | `getJNDIName()` Get the JNDI name at which connection factories based off this descriptor are to be bound.
`int` | `getMaxPoolSize()` Get the maximum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
`int` | `getMinPoolSize()` Get the minimum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
`INamespace` | `getParentNamespace()` Get this descriptor's parent namespace.
`QualifiedName` | `getQualifiedName()` Return a QualifiedName representing this descriptor's name and parent namespace.
`float` | `getTargetFractionOfMaxPoolSize()` Deprecated. Not supported by WLS JCA engine
`boolean` | `isPoolAllowedToShrink()` Indicates whether the J2EE Connector Architecture engine maintaining a connection pool based off this descriptor is allowed to close free connections to reach the requested min pool size.
`static void` | `main(java.lang.String[] args)`
`void` | `setAdapterLogicalName(java.lang.String logicalName)` Set the logical name of the adapter that will be associated with connection pools based off this descriptor.
`void` | `setAllowPoolToShrink(boolean allowPoolToShrink)` Set whether the J2EE Connector Architecture engine maintaining a connection pool based off this descriptor is allowed to close free connections to reach the requested min pool size.
`void` | `setJNDIName(java.lang.String jndiName)` Set the JNDI name at which connection factories based off this descriptor are to be bound.
`void` | `setMaxPoolSize(int maxPoolSize)` Set the maximum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
`void` | `setMinPoolSize(int minPoolSize)` Set the minimum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
`void` | `setName(java.lang.String name)` Set this descriptor's name.
`void` | `setParentNamespace(INamespace parent)` Set this descriptor's parent namespace.
`void` | `setTargetFractionOfMaxPoolSize(float targetFraction)` Deprecated. Not supported by WLS JCA engine
`void` | `toXML(IDocument doc)` Output an XML representation of this descriptor into an IDocument instance.

Methods inherited from class com.bea.wlai.common.AbstractPropertiedDescriptor
`addProperty, getProperty, listPropertyNames, removeProperty`

Methods inherited from class com.bea.wlai.common.AbstractDescriptor
`fromXML, fromXML, getDescription, getName, isReadOnly, makeReadOnly, setDescription, toXML, toXML`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConnectionFactoryDescriptor

    public ConnectionFactoryDescriptor(java.lang.String name,
                                       java.lang.String jndiName,
                                       java.lang.String description,
                                       java.lang.String adapterLogicalName,
                                       int minPoolSize,
                                       int maxPoolSize,
                                       float targetFractionOfMaxPoolSize,
                                       boolean allowPoolToShrink)
                                throws java.lang.IllegalArgumentException

  Deprecated. targetFractionOfMaxPoolSize is no longer supported
  Construct a new ServiceDescriptor with the given name, description, interaction spec class name, and request/response document descriptors.

  See Also:

### ConnectionFactoryDescriptor

    public ConnectionFactoryDescriptor(java.lang.String name,
                                       java.lang.String jndiName,
                                       java.lang.String description,
                                       java.lang.String adapterLogicalName,
                                       int minPoolSize,
                                       int maxPoolSize,
                                       boolean allowPoolToShrink)
                                throws java.lang.IllegalArgumentException

  Construct a new ServiceDescriptor with the given name, description, interaction spec class name, and request/response document descriptors.

Method Detail

### equals

    public boolean equals(java.lang.Object obj)

  Compare this object to the given object and determine if they are equal. For ConnectionFactory descriptors, this means that both objects match in name and parent namespace, they contain the same pool parameters and refer to the same adapter logical name.

  Returns:
    True if the two objects are equal, false otherwise.
  Overrides:
    equals in class java.lang.Object

### getQualifiedName

    public QualifiedName getQualifiedName()

  Return a QualifiedName representing this descriptor's name and parent namespace.

  Returns:
    A QualifiedName representing the descriptor's name and parent namespace. This should never be null.

### setName

    public void setName(java.lang.String name)
                 throws java.lang.IllegalArgumentException

  Set this descriptor's name. This method does not change the namespace to which the descriptor belongs, just its name.

  Parameters:
    `name` - The new name for this descriptor. Null is not allowed.
  Throws:
    java.lang.IllegalArgumentException - If the name param is null.
  Overrides:
    setName in class AbstractDescriptor

### getParentNamespace

    public INamespace getParentNamespace()

  Get this descriptor's parent namespace.

  Returns:
    This descriptor's parent namespace. This can only be null when the namespace is the root namespace, or the object does not yet exist in a namespace.

### setParentNamespace

    public void setParentNamespace(INamespace parent)

  Set this descriptor's parent namespace.

  Parameters:
    `parent` - This descriptor's parent namespace. Setting this parameter to null should be avoided, and indicates that the descriptor has no parent.

### setJNDIName

    public void setJNDIName(java.lang.String jndiName)

  Set the JNDI name at which connection factories based off this descriptor are to be bound.
  Specified by:
    setJNDIName in interface IConnectionFactoryDescriptor

  Parameters:
    `jndiName` - The JNDI name to which connection factories based off the descriptor will be bound.

### getJNDIName

    public java.lang.String getJNDIName()

  Get the JNDI name at which connection factories based off this descriptor are to be bound.
  Specified by:
    getJNDIName in interface IConnectionFactoryDescriptor

  Returns:
    The JNDI name to which connection factories based off the descriptor will be bound.

### setMinPoolSize

    public void setMinPoolSize(int minPoolSize)

  Set the minimum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
  Specified by:
    setMinPoolSize in interface IConnectionFactoryDescriptor

  Parameters:
    `minPoolSize` - The minimum number of connections in the connection pool. Must be greater than or equal to 0.

### getMinPoolSize

    public int getMinPoolSize()

  Get the minimum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
  Specified by:
    getMinPoolSize in interface IConnectionFactoryDescriptor

  Returns:
    The minimum number of connections in the connection pool. This will always be greater than or equal to 0.

### setMaxPoolSize

    public void setMaxPoolSize(int maxPoolSize)

  Set the maximum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
  Specified by:
    setMaxPoolSize in interface IConnectionFactoryDescriptor

  Parameters:
    `maxPoolSize` - The maximum number of connections in the connection pool. Must be greater than or equal to 0.

### getMaxPoolSize

    public int getMaxPoolSize()

  Get the maximum number of connections to maintain in any connection pool based off this IConnectionFactoryDescriptor.
  Specified by:
    getMaxPoolSize in interface IConnectionFactoryDescriptor

  Returns:
    The maximum number of connections in the connection pool. This will always be greater than 0.

### setTargetFractionOfMaxPoolSize

    public void setTargetFractionOfMaxPoolSize(float targetFraction)

  Deprecated. Not supported by WLS JCA engine
  Set the fraction of the maximum pool size that represents the number of connections to maintain in a connection pool based off this descriptor. This fraction must be greater than or equal to 0, and less than or equal to 1.0. The J2EE Connector Architecture engine will (if allowed to) try to close connections if the number of connections in the pool exceeds the value of * . This parameter only takes effect when there are free connections in the connection pool and when the isAllowedToShrink method returns true.
  Specified by:
    setTargetFractionOfMaxPoolSize in interface IConnectionFactoryDescriptor

  Parameters:
    `targetFraction` - A number between zero and one that represents the desired fraction of the max pool size to maintain on an ongoing basis.
  See Also:
    `setMinPoolSize(int)`

### getTargetFractionOfMaxPoolSize

    public float getTargetFractionOfMaxPoolSize()

  Deprecated. Not supported by WLS JCA engine
  Get the fraction of the maximum pool size that represents the number of connections to maintain in a connection pool based off this descriptor. This fraction is greater than or equal to 0, and less than or equal to 1.0. The J2EE Connector Architecture engine will (if allowed to) try to close connections if the number of connections in the pool exceeds the value of * . This parameter only takes effect when there are free connections in the connection pool and when the isAllowedToShrink method returns true.
  Specified by:
    getTargetFractionOfMaxPoolSize in interface IConnectionFactoryDescriptor

  Returns:
    A number between zero and one that represents the desired fraction of the max pool size to maintain on an ongoing basis.
  See Also:
    `getMinPoolSize()`

### isPoolAllowedToShrink

    public boolean isPoolAllowedToShrink()

  Indicates whether the J2EE Connector Architecture engine maintaining a connection pool based off this descriptor is allowed to close free connections to reach the requested min pool size. If this is false, no connections will be closed by the J2EE Connector Architecture engine.
  Specified by:
    isPoolAllowedToShrink in interface IConnectionFactoryDescriptor

  Returns:
    True if the pool is allowed to shrink, false otherwise.

### setAllowPoolToShrink

    public void setAllowPoolToShrink(boolean allowPoolToShrink)

  Set whether the J2EE Connector Architecture engine maintaining a connection pool based off this descriptor is allowed to close free connections to reach the requested min pool size. If this is false, no connections will be closed by the J2EE Connector Architecture engine.
  Specified by:
    setAllowPoolToShrink in interface IConnectionFactoryDescriptor

  Parameters:
    `allowPoolToShrink` - Pass true if the pool is allowed to shrink, false otherwise.

### getAdapterLogicalName

    public java.lang.String getAdapterLogicalName()

  Get the logical name of the adapter that will be associated with connection pools based off this descriptor. The associated adapter will be used to create new connections to be placed in the pool.
  Specified by:
    getAdapterLogicalName in interface IConnectionFactoryDescriptor

  Returns:
    The logical name for the adapter to be associated with this descriptor.

### setAdapterLogicalName

    public void setAdapterLogicalName(java.lang.String logicalName)

  Set the logical name of the adapter that will be associated with connection pools based off this descriptor. The associated adapter will be used to create new connections to be placed in the pool.
  Specified by:
    setAdapterLogicalName in interface IConnectionFactoryDescriptor

  Parameters:
    `logicalName` - The logical name for the adapter to be associated with this descriptor.

### toXML

    public void toXML(IDocument doc)
               throws DocumentException

  Output an XML representation of this descriptor into an IDocument instance.

  Parameters:
    `doc` - An IDocument instance to receive the data for this descriptor.
  Throws:
    DocumentException - If any error occurs while processing the XML for this descriptor.
  Overrides:
    toXML in class AbstractDescriptor

### fromXML

    public void fromXML(IDocument doc)
                 throws DocumentException

  Extract the data for this descriptor from the given IDocument instance, replacing all contents of the current descriptor with the new data.

  Parameters:
    `doc` - An IDocument instance from which the data for this descriptor will be extracted.
  Throws:
    DocumentException - If any error occurs while processing the XML for this descriptor.
  Overrides:
    fromXML in class AbstractDescriptor

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| WebLogic Integration
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Integration (WLI)