User: thedug
Date: 01/05/31 17:00:22
Modified: src/main/org/jboss/metadata ConfigurationMetaData.java
Log:
New commit option D...
Revision Changes Path
1.12 +41 -39 jboss/src/main/org/jboss/metadata/ConfigurationMetaData.java
Index: ConfigurationMetaData.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/metadata/ConfigurationMetaData.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ConfigurationMetaData.java 2001/01/30 01:09:34 1.11
+++ ConfigurationMetaData.java 2001/06/01 00:00:22 1.12
@@ -11,14 +11,14 @@
import org.jboss.ejb.DeploymentException;
/**
- * <description>
- *
+ * <description>
+ *
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public class ConfigurationMetaData extends MetaData {
-
+
// Constants -----------------------------------------------------
public static final String CMP_13 = "Standard CMP EntityBean";
public static final String BMP_13 = "Standard BMP EntityBean";
@@ -34,8 +34,10 @@
public static final byte A_COMMIT_OPTION = 0;
public static final byte B_COMMIT_OPTION = 1;
public static final byte C_COMMIT_OPTION = 2;
- public static final String[] commitOptionStrings = { "A", "B", "C" };
-
+ /** D_COMMIT_OPTION is a lazy load option. It synchronizes every 30 seconds */
+ public static final byte D_COMMIT_OPTION = 3;
+ public static final String[] commitOptionStrings = { "A", "B", "C", "D"};
+
// Attributes ----------------------------------------------------
private String name;
private String containerInvoker;
@@ -56,22 +58,22 @@
private Element containerInterceptorsConf;
// Static --------------------------------------------------------
-
+
// Constructors --------------------------------------------------
public ConfigurationMetaData (String name) {
this.name = name;
}
-
+
// Public --------------------------------------------------------
-
+
public String getName() { return name; }
-
+
public String getContainerInvoker() { return containerInvoker; }
-
+
public String getInstancePool() { return instancePool; }
-
+
public String getInstanceCache() { return instanceCache; }
-
+
public String getPersistenceManager() { return persistenceManager; }
public String getAuthenticationModule() { return authenticationModule; }
@@ -79,41 +81,41 @@
public String getRoleMappingManager() { return roleMappingManager; }
public String getTransactionManager() { return transactionManager; }
-
+
public Element getContainerInvokerConf() { return containerInvokerConf; }
public Element getContainerPoolConf() { return containerPoolConf; }
public Element getContainerCacheConf() { return containerCacheConf; }
public Element getContainerInterceptorsConf() { return
containerInterceptorsConf; }
public boolean getCallLogging() { return callLogging; }
-
+
public byte getCommitOption() { return commitOption; }
public boolean getReadOnlyGetMethods() { return readOnlyGetMethods; }
-
+
public void importJbossXml(Element element) throws DeploymentException {
// everything is optional to allow jboss.xml to modify part of a
configuration
// defined in standardjboss.xml
-
+
// set call logging
callLogging =
Boolean.valueOf(getElementContent(getOptionalChild(element, "call-logging"),
String.valueOf(callLogging))).booleanValue();
-
+
// set read-only get methods
readOnlyGetMethods =
Boolean.valueOf(getElementContent(getOptionalChild(element,
"read-only-get-methods"))).booleanValue();
-
+
// set the container invoker
containerInvoker = getElementContent(getOptionalChild(element,
"container-invoker"), containerInvoker);
-
+
// set the instance pool
instancePool = getElementContent(getOptionalChild(element,
"instance-pool"), instancePool);
-
+
// set the instance cache
instanceCache = getElementContent(getOptionalChild(element,
"instance-cache"), instanceCache);
-
+
// set the persistence manager
persistenceManager = getElementContent(getOptionalChild(element,
"persistence-manager"), persistenceManager);
-
+
// set the transaction manager
transactionManager = getElementContent(getOptionalChild(element,
"transaction-manager"), transactionManager);
@@ -125,10 +127,10 @@
// set the commit option
String commit = getElementContent(getOptionalChild(element,
"commit-option"), commitOptionToString(commitOption));
-
+
commitOption = stringToCommitOption(commit);
-
- // the classes which can understand the following are dynamically
loaded during deployment :
+
+ // the classes which can understand the following are dynamically
loaded during deployment :
// We save the Elements for them to use later
// The configuration for the container interceptors
@@ -136,13 +138,13 @@
// configuration for container invoker
containerInvokerConf = getOptionalChild(element, "container-invoker-conf",
containerInvokerConf);
-
+
// configuration for instance pool
containerPoolConf = getOptionalChild(element, "container-pool-conf",
containerPoolConf);
-
+
// configuration for instance cache
containerCacheConf = getOptionalChild(element, "container-cache-conf",
containerCacheConf);
-
+
// DEPRECATED: Remove this in JBoss 4.0
if
(containerInvoker.equals("org.jboss.ejb.plugins.jrmp12.server.JRMPContainerInvoker") ||
containerInvoker.equals("org.jboss.ejb.plugins.jrmp13.server.JRMPContainerInvoker"))
@@ -150,32 +152,32 @@
System.out.println("Deprecated container invoker. Change to
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker");
containerInvoker =
"org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker";
}
- }
-
+ }
+
// Package protected ---------------------------------------------
-
+
// Protected -----------------------------------------------------
-
+
// Private -------------------------------------------------------
private static String commitOptionToString(byte commitOption)
throws DeploymentException {
-
+
try {
return commitOptionStrings[commitOption];
} catch( ArrayIndexOutOfBoundsException e ) {
throw new DeploymentException("Invalid commit option: " +
commitOption);
}
}
-
+
private static byte stringToCommitOption(String commitOption)
throws DeploymentException {
-
+
for( byte i=0; i<commitOptionStrings.length; ++i )
- if( commitOptionStrings[i].equals(commitOption) )
+ if( commitOptionStrings[i].equals(commitOption) )
return i;
-
+
throw new DeploymentException("Invalid commit option: '" + commitOption +
"'");
}
-
+
// Inner classes -------------------------------------------------
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development