001: /**
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: *
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or 1any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * Initial developer: JOnAS team
023: * --------------------------------------------------------------------------
024: * $Id: JonasEntityRuleSet.java 9280 2006-08-01 10:15:24Z japaz $
025: * --------------------------------------------------------------------------
026: */package org.objectweb.jonas_ejb.deployment.rules;
027:
028: import org.apache.commons.digester.Digester;
029: import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase;
030: import org.objectweb.jonas_lib.deployment.rules.JonasEnvironmentRuleSet;
031:
032: /**
033: * This class defines the rules to analyze the element jonas-entity
034: *
035: * @author JOnAS team
036: */
037:
038: public class JonasEntityRuleSet extends JRuleSetBase {
039:
040: /**
041: * Construct an object with a specific prefix
042: * @param prefix prefix to use during the parsing
043: */
044: public JonasEntityRuleSet(String prefix) {
045: super (prefix);
046: }
047:
048: /**
049: * Add a set of rules to the digester object
050: * @param digester Digester instance
051: */
052:
053: public void addRuleInstances(Digester digester) {
054: digester.addObjectCreate(prefix + "jonas-entity",
055: "org.objectweb.jonas_ejb.deployment.xml.JonasEntity");
056: digester.addSetNext(prefix + "jonas-entity", "addJonasEntity",
057: "org.objectweb.jonas_ejb.deployment.xml.JonasEntity");
058: digester.addCallMethod(prefix + "jonas-entity/ejb-name",
059: "setEjbName", 0);
060: digester.addCallMethod(prefix + "jonas-entity/jndi-name",
061: "setJndiName", 0);
062: digester.addCallMethod(prefix + "jonas-entity/jndi-local-name",
063: "setJndiLocalName", 0);
064: digester.addRuleSet(new JonasEnvironmentRuleSet(prefix
065: + "jonas-entity/"));
066:
067: digester.addCallMethod(prefix
068: + "jonas-entity/is-modified-method-name",
069: "setIsModifiedMethodName", 0);
070: digester.addCallMethod(prefix
071: + "jonas-entity/passivation-timeout",
072: "setPassivationTimeout", 0);
073: digester.addCallMethod(prefix
074: + "jonas-entity/inactivity-timeout",
075: "setInactivityTimeout", 0);
076: digester.addCallMethod(
077: prefix + "jonas-entity/deadlock-timeout",
078: "setDeadlockTimeout", 0);
079: digester.addCallMethod(prefix + "jonas-entity/read-timeout",
080: "setReadTimeout", 0);
081: digester.addCallMethod(prefix + "jonas-entity/max-wait-time",
082: "setMaxWaitTime", 0);
083: digester.addCallMethod(prefix + "jonas-entity/shared",
084: "setShared", 0);
085: digester.addCallMethod(prefix + "jonas-entity/prefetch",
086: "setPrefetch", 0);
087: digester.addCallMethod(prefix + "jonas-entity/hard-limit",
088: "setHardLimit", 0);
089: digester.addCallMethod(prefix + "jonas-entity/max-cache-size",
090: "setMaxCacheSize", 0);
091: digester.addCallMethod(prefix + "jonas-entity/min-pool-size",
092: "setMinPoolSize", 0);
093: digester.addCallMethod(prefix + "jonas-entity/cleanup",
094: "setCleanup", 0);
095: digester.addCallMethod(prefix + "jonas-entity/lock-policy",
096: "setLockPolicy", 0);
097: digester.addCallMethod(prefix
098: + "jonas-entity/cluster-home-distributor",
099: "setClusterHomeDistributor", 0);
100: digester.addCallMethod(prefix
101: + "jonas-entity/cluster-replicated",
102: "setClusterReplicated", 0);
103: digester.addRuleSet(new JdbcMappingRuleSet(prefix
104: + "jonas-entity/"));
105: digester.addRuleSet(new IorSecurityConfigRuleSet(prefix
106: + "jonas-entity/"));
107: }
108: }
|