Fields Summary |
---|
public static final String | AVAILABILITY_ENABLED |
private boolean | isReadOnlyBean |
private int | refreshPeriodInSecondsA string field whose value denoted the rate at which the read-only-bean
must be refreshed from the data source.
Valid values are: negative (never refreshed), 0 (always refreshed)
and positive (refreshed at specified intervals).
Note that the value is just a hint to the container. |
private int | jmsMaxMessagesLoadA string value specifies the maximum number of messages to
load into a JMS session at one time for a message-driven
bean to serve. If not specified, the default is 1. |
private MdbConnectionFactoryDescriptor | mdbConnectionFactory |
private String | commitOptionA string field whose valid values are either A, B, or C.
Default value is set in the server configuration (server.xml). |
private BeanPoolDescriptor | beanPoolThis contains the bean pool properties. Used only for stateless
session bean and mdb pools. |
private BeanCacheDescriptor | beanCacheThis contains the bean cache properties. Used only for entity beans. |
private FlushAtEndOfMethodDescriptor | flushMethodDescriptor |
private CheckpointAtEndOfMethodDescriptor | checkpointMethodDescriptor |
private String | checkpointedMethods |
private Boolean | passByReferenceThis contains the pass-by-reference property. |
private com.sun.enterprise.deployment.EjbDescriptor | ejbDescriptor |
private int | cmtTimeoutInSecondsThis contains the timeout used for container started transactions
This value is used by the container only if the value is greater than 0 |
private String | useThreadPoolIdSpecifes the thread pool to be used for this ejb's invocation |
private static final String | METHODS_DELIM |
private static final String | PARAMS_DELIM |
private static final String | LEFT_PAREN |
private static final String | RIGHT_PAREN |
private static final String | PARAM_DELIM |
Methods Summary |
---|
public BeanCacheDescriptor | getBeanCache()Getter for property beanCache.
return beanCache;
|
public BeanPoolDescriptor | getBeanPool()Getter for property beanPool.
return beanPool;
|
public CheckpointAtEndOfMethodDescriptor | getCheckpointAtEndOfMethodDescriptor()Getter for checkpoint-at-end-of-method
return checkpointMethodDescriptor;
|
public java.lang.String | getCheckpointedMethods()Getter for property checkpointedMethods
return checkpointedMethods;
|
public int | getCmtTimeoutInSeconds()Getter for property cmt-timeout-in-seconds.
return this.cmtTimeoutInSeconds;
|
public java.lang.String | getCommitOption()Getter for property commitOption.
return commitOption;
|
public com.sun.enterprise.deployment.EjbDescriptor | getEjbDescriptor()Getter for property ejbDescriptor.
return this.ejbDescriptor;
|
public FlushAtEndOfMethodDescriptor | getFlushAtEndOfMethodDescriptor()Getter for flush-at-end-of-method
return flushMethodDescriptor;
|
public int | getJmsMaxMessagesLoad()Getter for property jmsMaxMessagesLoad.
return jmsMaxMessagesLoad;
|
public MdbConnectionFactoryDescriptor | getMdbConnectionFactory()Getter for property mdbConnectionFactory.
return mdbConnectionFactory;
|
public boolean | getPassByReference()Gets ejb pass-by-reference value.
boolean passByReference = false; // default
// if pass-by-reference defined for ejb
if (this.isPassByReferenceDefined()) {
passByReference = this.passByReference.booleanValue();
// if pass-by-reference undefined for ejb set to
// application's pass-by-reference value if defined
} else {
ejbDescriptor = this.getEjbDescriptor();
if (ejbDescriptor != null) {
Application application = ejbDescriptor.getApplication();
if (application != null) {
if (application.isPassByReferenceDefined()) {
passByReference = application.getPassByReference();
}
}
}
}
return passByReference;
|
public int | getRefreshPeriodInSeconds()Getter for property refreshPeriodInSeconds.
return refreshPeriodInSeconds;
|
public java.lang.String | getUseThreadPoolId()Getter for the property use-thread-pool-id
return this.useThreadPoolId;
|
public boolean | isFlushEnabledFor(com.sun.enterprise.deployment.MethodDescriptor methodDesc)Convenience method to check if a method is flush enabled or not
if (flushMethodDescriptor != null) {
return flushMethodDescriptor.isFlushEnabledFor(methodDesc);
}
return false;
|
public boolean | isIsReadOnlyBean()Getter for property isReadOnlyBean.
return isReadOnlyBean;
|
public boolean | isPassByReferenceDefined()Evaluates property passByReference for null value
boolean passByReferenceDefined = false;
if (this.passByReference != null) {
passByReferenceDefined = true;
}
return passByReferenceDefined;
|
private com.sun.enterprise.deployment.MethodDescriptor | parseCheckpointedMethod(java.lang.String method)
String methodName, methodParams;
ArrayList paramTypeList = new ArrayList();
try {
if ( method.indexOf(LEFT_PAREN) != -1 &&
method.indexOf(RIGHT_PAREN) != -1 ) {
int pos = method.indexOf(LEFT_PAREN);
int pos2 = method.indexOf(RIGHT_PAREN);
// retrieve the method name
methodName = method.substring(0, pos).trim();
// retrieve the parameter list
if (pos < pos2-1) {
methodParams = method.substring(pos+1, pos2).trim();
StringTokenizer paramsTokenizer =
new StringTokenizer(methodParams, PARAMS_DELIM);
while (paramsTokenizer.hasMoreTokens()) {
// process each param
String param = paramsTokenizer.nextToken().trim();
if (param.length() == 0) {
continue;
}
StringTokenizer paramTokenizer =
new StringTokenizer(param, PARAM_DELIM);
while (paramTokenizer.hasMoreTokens()) {
String paramType =
paramTokenizer.nextToken().trim();
if (paramType.length() != 0) {
paramTypeList.add(paramType);
// only interested in the first token
break;
}
}
}
}
if (paramTypeList.size() > 0) {
String[] paramTypeArray = (String[])paramTypeList.toArray(
new String[paramTypeList.size()]);
return new MethodDescriptor(methodName, null,
paramTypeArray, null);
} else {
return new MethodDescriptor(methodName, null, null, null);
}
} else {
DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment_badformat_checkpointedmethods", new Object[] {method});
return null;
}
} catch (Exception e) {
e.printStackTrace();
// any parsing exception indicates it is not a well-formed
// string, we will just print warning and return null
DOLUtils.getDefaultLogger().log(Level.WARNING, "enterprise.deployment_badformat_checkpointedmethods", new Object[] {method});
return null;
}
|
public void | parseCheckpointedMethods(com.sun.enterprise.deployment.EjbDescriptor ejbDesc)Parse checkpointed-methods element and save its values in
CheckpointAtEndOfMethodDescriptor
The methods should be separated by semicolons.
The param list should separated by commas.
All method param types should be full qualified.
Variable name is allowed for the param type.
No return type or exception type.
Example:
foo(java.lang.String, a.b.c d); bar(java.lang.String s)
if (checkpointedMethods == null ||
checkpointedMethods.trim().length() == 0) {
return;
}
if (checkpointMethodDescriptor == null) {
checkpointMethodDescriptor =
new CheckpointAtEndOfMethodDescriptor();
setCheckpointAtEndOfMethodDescriptor(checkpointMethodDescriptor);
checkpointMethodDescriptor.setEjbDescriptor(ejbDesc);
}
StringTokenizer methodsTokenizer =
new StringTokenizer(checkpointedMethods, METHODS_DELIM);
while (methodsTokenizer.hasMoreTokens()) {
// process each method
String method = methodsTokenizer.nextToken().trim();
if (method.length() == 0) {
continue;
}
MethodDescriptor methodDescriptor =
parseCheckpointedMethod(method);
if (methodDescriptor != null) {
checkpointMethodDescriptor.getMethodDescriptors().add(
methodDescriptor);
}
}
|
public void | setBeanCache(BeanCacheDescriptor beanCache)Setter for property beanCache.
this.beanCache = beanCache;
|
public void | setBeanPool(BeanPoolDescriptor beanPool)Setter for property beanPool.
this.beanPool = beanPool;
|
public void | setCheckpointAtEndOfMethodDescriptor(CheckpointAtEndOfMethodDescriptor checkpointMethodDescriptor)Setter for checkpoint-at-end-of-method
this.checkpointMethodDescriptor = checkpointMethodDescriptor;
|
public void | setCheckpointedMethods(java.lang.String checkpointedMethods)Setter for property checkpointedMethods
this.checkpointedMethods = checkpointedMethods;
|
public void | setCmtTimeoutInSeconds(int val)Setter for property cmt-timeout-in-seconds.
this.cmtTimeoutInSeconds = val;
|
public void | setCommitOption(java.lang.String commitOption)Setter for property commitOption.
this.commitOption = commitOption;
|
public void | setEjbDescriptor(com.sun.enterprise.deployment.EjbDescriptor ejbDescriptor)Setter for property ejbDescriptor
this.ejbDescriptor = ejbDescriptor;
|
public void | setFlushAtEndOfMethodDescriptor(FlushAtEndOfMethodDescriptor flushMethodDescriptor)Setter for flush-at-end-of-method
this.flushMethodDescriptor = flushMethodDescriptor;
|
public void | setIsReadOnlyBean(boolean isReadOnlyBean)Setter for property isReadOnlyBean.
this.isReadOnlyBean = isReadOnlyBean;
|
public void | setJmsMaxMessagesLoad(int jmsMaxMessagesLoad)Setter for property jmsMaxMessagesLoad.
this.jmsMaxMessagesLoad = jmsMaxMessagesLoad;
|
public void | setMdbConnectionFactory(MdbConnectionFactoryDescriptor mdbConnectionFactory)Setter for property mdbConnectionFactory.
this.mdbConnectionFactory = mdbConnectionFactory;
|
public void | setPassByReference(boolean passByReference)Sets ejb pass-by-reference value.
this.passByReference = Boolean.valueOf(passByReference);
|
public void | setPassByReference(java.lang.Boolean passByReference)Sets ejb pass-by-reference value.
this.passByReference = passByReference;
|
public void | setRefreshPeriodInSeconds(int refreshPeriodInSeconds)Setter for property refreshPeriodInSeconds.
this.refreshPeriodInSeconds = refreshPeriodInSeconds;
|
public void | setUseThreadPoolId(java.lang.String val)Setter for the property use-thread-pool-id
this.useThreadPoolId = val;
|