001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software 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 software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.metadata;
023:
024: import org.w3c.dom.Element;
025:
026: import org.jboss.deployment.DeploymentException;
027: import org.jboss.cache.invalidation.InvalidationManager;
028:
029: /**
030: * Manages attributes related to distributed (possibly local-only)
031: * cache invalidations
032: *
033: * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
034: * @version $Revision: 57209 $
035: *
036: * <p><b>Revisions:</b>
037: *
038: * <p><b>26 septembre 2002 Sacha Labourey:</b>
039: * <ul>
040: * <li> First implementation </li>
041: * </ul>
042: */
043:
044: public class CacheInvalidationConfigMetaData extends MetaData {
045:
046: // Constants -----------------------------------------------------
047:
048: // Attributes ----------------------------------------------------
049:
050: protected String invalidationGroupName = null;
051: protected String cacheInvaliderObjectName = null;
052:
053: // Static --------------------------------------------------------
054:
055: // Constructors --------------------------------------------------
056:
057: public CacheInvalidationConfigMetaData() {
058: super ();
059: }
060:
061: // Public --------------------------------------------------------
062:
063: public String getInvalidationGroupName() {
064: return this .invalidationGroupName;
065: }
066:
067: public String getInvalidationManagerName() {
068: return this .cacheInvaliderObjectName;
069: }
070:
071: public void init(BeanMetaData data) {
072: // by default we use the bean name as the group name
073: //
074: this .invalidationGroupName = data.getEjbName();
075:
076: this .cacheInvaliderObjectName = InvalidationManager.DEFAULT_JMX_SERVICE_NAME;
077: }
078:
079: public void importJbossXml(Element element)
080: throws DeploymentException {
081: this .invalidationGroupName = getElementContent(
082: getOptionalChild(element, "invalidation-group-name"),
083: this .invalidationGroupName);
084: this .cacheInvaliderObjectName = getElementContent(
085: getOptionalChild(element, "invalidation-manager-name"),
086: this .cacheInvaliderObjectName);
087: }
088:
089: // Z implementation ----------------------------------------------
090:
091: // Y overrides ---------------------------------------------------
092:
093: // Package protected ---------------------------------------------
094:
095: // Protected -----------------------------------------------------
096:
097: // Private -------------------------------------------------------
098:
099: // Inner classes -------------------------------------------------
100:
101: }
|