Skip to content

Commit

Permalink
DescriptorConstants moved to their classes
Browse files Browse the repository at this point in the history
- the interface wasn't an interface, just a container of constants.
- all constants were used just on a single place

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed Sep 18, 2022
1 parent 27d3388 commit 2de560d
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 191 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,47 @@
package com.sun.enterprise.deployment.runtime;

import org.glassfish.deployment.common.Descriptor;
import com.sun.enterprise.deployment.DescriptorConstants;

/** iAS specific DD Element (see the ias-ejb-jar_2_0.dtd for this element)

/**
* iAS specific DD Element (see the ias-ejb-jar_2_0.dtd for this element)
*
* @author Ludo
* @since JDK 1.4
*/
public class BeanPoolDescriptor extends Descriptor implements DescriptorConstants {
public class BeanPoolDescriptor extends Descriptor {

private static final long serialVersionUID = 1L;

/**
* Bean Pool - maximum size, a pool of slsb can grow to.
*/
private static final int MAX_POOL_SIZE_DEFAULT = -1;

/**
* Bean Pool - maximum time a caller will have to wait when pool
* has reached maximum configured size and an instance is not
* available to process the incoming request.
*/
private static final int MAX_WAIT_TIME_DEFAULT = -1;

/**
* Bean Pool - size of slsb pool grows in increments specified by
* resize-quantity, within the configured upper limit max-pool-size.
*/
private static final int POOL_RESIZE_QTY_DEFAULT = -1;

/**
* Bean Pool - minimum number of slsb instances maintained in a pool.
*/
private static final int STEADY_POOL_SIZE_DEFAULT = -1;

/**
* Bean Pool - idle bean instance in a pool becomes a candidate for
* passivation (sfsb/eb) or deletion (slsb), when this timeout expires.
*/
private static final int POOL_IDLE_TIMEOUT_DEFAULT = -1;


private int maxPoolSize = MAX_POOL_SIZE_DEFAULT;
private int poolIdleTimeoutInSeconds = POOL_IDLE_TIMEOUT_DEFAULT;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -16,20 +17,45 @@

package org.glassfish.ejb.deployment.descriptor.runtime;

import com.sun.enterprise.deployment.DescriptorConstants;
import org.glassfish.deployment.common.Descriptor;


/**
* iAS specific DD Element (see the ias-ejb-jar_2_0.dtd for this element)
* @author Ludo
* @since JDK 1.4
*/
public class BeanCacheDescriptor extends Descriptor implements DescriptorConstants{
public class BeanCacheDescriptor extends Descriptor {

private static final long serialVersionUID = 1L;

/**
* Bean Cache - sfsb and eb are created and cached, on demand.
*/
private static final int MAX_CACHE_SIZE_DEFAULT = -1;

/**
* Bean Cache - resize quantity
*/
private static final int RESIZE_QUANTITY_DEFAULT = -1;

/**
* Bean Cache - Passivated bean (sfsb/eb) instance is removed if it
* is not accesed within this time, after passivation
*/
private static final int REMOVAL_TIMEOUT_DEFAULT = -1;

/**
* Bean Cache - idle bean instance in a pool becomes a candidate for
* passivation (sfsb/eb) or deletion (slsb), when this timeout expires.
*/
private static final int CACHE_IDLE_TIMEOUT_DEFAULT = -1;


private Boolean isCacheOverflowAllowed;
private String victimSelectionPolicy;

//initialized default values for class variables
// initialized default values for class variables
private int maxCacheSize = MAX_CACHE_SIZE_DEFAULT;
private int resizeQuantity = RESIZE_QUANTITY_DEFAULT;
private int cacheIdleTimeoutInSeconds = CACHE_IDLE_TIMEOUT_DEFAULT;
Expand Down

0 comments on commit 2de560d

Please sign in to comment.