FileDocCategorySizeDatePackage
EjbContainer.javaAPI DocGlassfish v2 API18779Fri May 26 10:47:06 BST 2006com.sun.enterprise.config.serverbeans

EjbContainer

public class EjbContainer extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class EjbContainer matches the DTD element ejb-container

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
EJB_TIMER_SERVICE
public static final String
ELEMENT_PROPERTY
Constructors Summary
public EjbContainer()


	  
		this(Common.USE_DEFAULT_VALUES);
	
public EjbContainer(int options)

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(2);
		this.createProperty("ejb-timer-service", EJB_TIMER_SERVICE, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			EjbTimerService.class);
		this.createAttribute(EJB_TIMER_SERVICE, "minimum-delivery-interval-in-millis", "MinimumDeliveryIntervalInMillis", 
						AttrProp.CDATA,
						null, "7000");
		this.createAttribute(EJB_TIMER_SERVICE, "max-redeliveries", "MaxRedeliveries", 
						AttrProp.CDATA,
						null, "1");
		this.createAttribute(EJB_TIMER_SERVICE, "timer-datasource", "TimerDatasource", 
						AttrProp.CDATA | AttrProp.IMPLIED,
						null, null);
		this.createAttribute(EJB_TIMER_SERVICE, "redelivery-interval-internal-in-millis", "RedeliveryIntervalInternalInMillis", 
						AttrProp.CDATA,
						null, "5000");
		this.createProperty("property", ELEMENT_PROPERTY, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ElementProperty.class);
		this.createAttribute(ELEMENT_PROPERTY, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(ELEMENT_PROPERTY, "value", "Value", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddElementProperty(ElementProperty value)

		return addElementProperty(value, true);
	
public intaddElementProperty(ElementProperty value, boolean overwrite)

		ElementProperty old = getElementPropertyByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(EjbContainer.class).getString("cannotAddDuplicate",  "ElementProperty"));
		}
		return this.addValue(ELEMENT_PROPERTY, value, overwrite);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("EjbTimerService");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getEjbTimerService();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(EJB_TIMER_SERVICE, 0, str, indent);

		str.append(indent);
		str.append("ElementProperty["+this.sizeElementProperty()+"]");	// NOI18N
		for(int i=0; i<this.sizeElementProperty(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getElementProperty(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(ELEMENT_PROPERTY, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("EjbContainer\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetCacheIdleTimeoutInSeconds()
Getter for CacheIdleTimeoutInSeconds of the Element ejb-container

return
the CacheIdleTimeoutInSeconds of the Element ejb-container

		return getAttributeValue(ServerTags.CACHE_IDLE_TIMEOUT_IN_SECONDS);
	
public java.lang.StringgetCacheResizeQuantity()
Getter for CacheResizeQuantity of the Element ejb-container

return
the CacheResizeQuantity of the Element ejb-container

		return getAttributeValue(ServerTags.CACHE_RESIZE_QUANTITY);
	
public java.lang.StringgetCommitOption()
Getter for CommitOption of the Element ejb-container

return
the CommitOption of the Element ejb-container

		return getAttributeValue(ServerTags.COMMIT_OPTION);
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
		if(attr.equals(ServerTags.STEADY_POOL_SIZE)) return "32".trim();
		if(attr.equals(ServerTags.POOL_RESIZE_QUANTITY)) return "16".trim();
		if(attr.equals(ServerTags.MAX_POOL_SIZE)) return "64".trim();
		if(attr.equals(ServerTags.CACHE_RESIZE_QUANTITY)) return "32".trim();
		if(attr.equals(ServerTags.MAX_CACHE_SIZE)) return "512".trim();
		if(attr.equals(ServerTags.POOL_IDLE_TIMEOUT_IN_SECONDS)) return "600".trim();
		if(attr.equals(ServerTags.CACHE_IDLE_TIMEOUT_IN_SECONDS)) return "600".trim();
		if(attr.equals(ServerTags.REMOVAL_TIMEOUT_IN_SECONDS)) return "5400".trim();
		if(attr.equals(ServerTags.VICTIM_SELECTION_POLICY)) return "nru".trim();
		if(attr.equals(ServerTags.COMMIT_OPTION)) return "B".trim();
	return null;
	
public static java.lang.StringgetDefaultCacheIdleTimeoutInSeconds()
Get the default value of CacheIdleTimeoutInSeconds from dtd

		return "600".trim();
	
public static java.lang.StringgetDefaultCacheResizeQuantity()
Get the default value of CacheResizeQuantity from dtd

		return "32".trim();
	
public static java.lang.StringgetDefaultCommitOption()
Get the default value of CommitOption from dtd

		return "B".trim();
	
public static java.lang.StringgetDefaultMaxCacheSize()
Get the default value of MaxCacheSize from dtd

		return "512".trim();
	
public static java.lang.StringgetDefaultMaxPoolSize()
Get the default value of MaxPoolSize from dtd

		return "64".trim();
	
public static java.lang.StringgetDefaultPoolIdleTimeoutInSeconds()
Get the default value of PoolIdleTimeoutInSeconds from dtd

		return "600".trim();
	
public static java.lang.StringgetDefaultPoolResizeQuantity()
Get the default value of PoolResizeQuantity from dtd

		return "16".trim();
	
public static java.lang.StringgetDefaultRemovalTimeoutInSeconds()
Get the default value of RemovalTimeoutInSeconds from dtd

		return "5400".trim();
	
public static java.lang.StringgetDefaultSteadyPoolSize()
Get the default value of SteadyPoolSize from dtd

		return "32".trim();
	
public static java.lang.StringgetDefaultVictimSelectionPolicy()
Get the default value of VictimSelectionPolicy from dtd

		return "nru".trim();
	
public EjbTimerServicegetEjbTimerService()

		return (EjbTimerService)this.getValue(EJB_TIMER_SERVICE);
	
public ElementPropertygetElementProperty(int index)

		return (ElementProperty)this.getValue(ELEMENT_PROPERTY, index);
	
public ElementProperty[]getElementProperty()

		return (ElementProperty[])this.getValues(ELEMENT_PROPERTY);
	
public ElementPropertygetElementPropertyByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	ElementProperty[] o = getElementProperty();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
public java.lang.StringgetMaxCacheSize()
Getter for MaxCacheSize of the Element ejb-container

return
the MaxCacheSize of the Element ejb-container

		return getAttributeValue(ServerTags.MAX_CACHE_SIZE);
	
public java.lang.StringgetMaxPoolSize()
Getter for MaxPoolSize of the Element ejb-container

return
the MaxPoolSize of the Element ejb-container

		return getAttributeValue(ServerTags.MAX_POOL_SIZE);
	
public java.lang.StringgetPoolIdleTimeoutInSeconds()
Getter for PoolIdleTimeoutInSeconds of the Element ejb-container

return
the PoolIdleTimeoutInSeconds of the Element ejb-container

		return getAttributeValue(ServerTags.POOL_IDLE_TIMEOUT_IN_SECONDS);
	
public java.lang.StringgetPoolResizeQuantity()
Getter for PoolResizeQuantity of the Element ejb-container

return
the PoolResizeQuantity of the Element ejb-container

		return getAttributeValue(ServerTags.POOL_RESIZE_QUANTITY);
	
protected java.lang.StringgetRelativeXPath()
get the xpath representation for this element returns something like abc[@name='value'] or abc depending on the type of the bean

	    String ret = null;
	    ret = "ejb-container";
	    return (null != ret ? ret.trim() : null);
	
public java.lang.StringgetRemovalTimeoutInSeconds()
Getter for RemovalTimeoutInSeconds of the Element ejb-container

return
the RemovalTimeoutInSeconds of the Element ejb-container

		return getAttributeValue(ServerTags.REMOVAL_TIMEOUT_IN_SECONDS);
	
public java.lang.StringgetSessionStore()
Getter for SessionStore of the Element ejb-container

return
the SessionStore of the Element ejb-container

			return getAttributeValue(ServerTags.SESSION_STORE);
	
public java.lang.StringgetSteadyPoolSize()
Getter for SteadyPoolSize of the Element ejb-container

return
the SteadyPoolSize of the Element ejb-container

		return getAttributeValue(ServerTags.STEADY_POOL_SIZE);
	
public java.lang.StringgetVictimSelectionPolicy()
Getter for VictimSelectionPolicy of the Element ejb-container

return
the VictimSelectionPolicy of the Element ejb-container

		return getAttributeValue(ServerTags.VICTIM_SELECTION_POLICY);
	
voidinitialize(int options)


	
public EjbTimerServicenewEjbTimerService()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new EjbTimerService();
	
public ElementPropertynewElementProperty()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new ElementProperty();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveElementProperty(ElementProperty value)

		return this.removeValue(ELEMENT_PROPERTY, value);
	
public intremoveElementProperty(ElementProperty value, boolean overwrite)

		return this.removeValue(ELEMENT_PROPERTY, value, overwrite);
	
public voidsetCacheIdleTimeoutInSeconds(java.lang.String v, boolean overwrite)
Modify the CacheIdleTimeoutInSeconds of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.CACHE_IDLE_TIMEOUT_IN_SECONDS, v, overwrite);
	
public voidsetCacheIdleTimeoutInSeconds(java.lang.String v)
Modify the CacheIdleTimeoutInSeconds of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.CACHE_IDLE_TIMEOUT_IN_SECONDS, v);
	
public voidsetCacheResizeQuantity(java.lang.String v, boolean overwrite)
Modify the CacheResizeQuantity of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.CACHE_RESIZE_QUANTITY, v, overwrite);
	
public voidsetCacheResizeQuantity(java.lang.String v)
Modify the CacheResizeQuantity of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.CACHE_RESIZE_QUANTITY, v);
	
public voidsetCommitOption(java.lang.String v, boolean overwrite)
Modify the CommitOption of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.COMMIT_OPTION, v, overwrite);
	
public voidsetCommitOption(java.lang.String v)
Modify the CommitOption of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.COMMIT_OPTION, v);
	
public voidsetEjbTimerService(EjbTimerService value)

		this.setValue(EJB_TIMER_SERVICE, value);
	
public voidsetElementProperty(ElementProperty[] value)

		this.setValue(ELEMENT_PROPERTY, value);
	
public voidsetMaxCacheSize(java.lang.String v, boolean overwrite)
Modify the MaxCacheSize of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.MAX_CACHE_SIZE, v, overwrite);
	
public voidsetMaxCacheSize(java.lang.String v)
Modify the MaxCacheSize of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.MAX_CACHE_SIZE, v);
	
public voidsetMaxPoolSize(java.lang.String v, boolean overwrite)
Modify the MaxPoolSize of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.MAX_POOL_SIZE, v, overwrite);
	
public voidsetMaxPoolSize(java.lang.String v)
Modify the MaxPoolSize of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.MAX_POOL_SIZE, v);
	
public voidsetPoolIdleTimeoutInSeconds(java.lang.String v, boolean overwrite)
Modify the PoolIdleTimeoutInSeconds of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.POOL_IDLE_TIMEOUT_IN_SECONDS, v, overwrite);
	
public voidsetPoolIdleTimeoutInSeconds(java.lang.String v)
Modify the PoolIdleTimeoutInSeconds of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.POOL_IDLE_TIMEOUT_IN_SECONDS, v);
	
public voidsetPoolResizeQuantity(java.lang.String v, boolean overwrite)
Modify the PoolResizeQuantity of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.POOL_RESIZE_QUANTITY, v, overwrite);
	
public voidsetPoolResizeQuantity(java.lang.String v)
Modify the PoolResizeQuantity of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.POOL_RESIZE_QUANTITY, v);
	
public voidsetRemovalTimeoutInSeconds(java.lang.String v, boolean overwrite)
Modify the RemovalTimeoutInSeconds of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.REMOVAL_TIMEOUT_IN_SECONDS, v, overwrite);
	
public voidsetRemovalTimeoutInSeconds(java.lang.String v)
Modify the RemovalTimeoutInSeconds of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.REMOVAL_TIMEOUT_IN_SECONDS, v);
	
public voidsetSessionStore(java.lang.String v, boolean overwrite)
Modify the SessionStore of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.SESSION_STORE, v, overwrite);
	
public voidsetSessionStore(java.lang.String v)
Modify the SessionStore of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.SESSION_STORE, v);
	
public voidsetSteadyPoolSize(java.lang.String v, boolean overwrite)
Modify the SteadyPoolSize of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.STEADY_POOL_SIZE, v, overwrite);
	
public voidsetSteadyPoolSize(java.lang.String v)
Modify the SteadyPoolSize of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.STEADY_POOL_SIZE, v);
	
public voidsetVictimSelectionPolicy(java.lang.String v, boolean overwrite)
Modify the VictimSelectionPolicy of the Element ejb-container

param
v the new value
throws
StaleWriteConfigException if overwrite is false and file changed on disk

		setAttributeValue(ServerTags.VICTIM_SELECTION_POLICY, v, overwrite);
	
public voidsetVictimSelectionPolicy(java.lang.String v)
Modify the VictimSelectionPolicy of the Element ejb-container

param
v the new value

		setAttributeValue(ServerTags.VICTIM_SELECTION_POLICY, v);
	
public intsizeElementProperty()

		return this.size(ELEMENT_PROPERTY);
	
public voidvalidate()