001: /**
002: * EasyBeans
003: * Copyright (C) 2006 Bull S.A.S.
004: * Contact: easybeans@ow2.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: SFSBCMTDeployDesc.java 1970 2007-10-16 11:49:25Z benoitf $
023: * --------------------------------------------------------------------------
024: */package org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor;
025:
026: import org.ow2.easybeans.tests.common.db.TableManager;
027:
028: /**
029: * Used to verify the definition of transaction by the deployment descriptor.
030: * @author Gisele Pinheiro Souza
031: * @author Eduardo Studzinski Estima de Castro
032: *
033: */
034: public class SFSBCMTDeployDesc implements ItfCMTDeployDesc {
035:
036: /**
037: * Inserts a table the database.
038: * @param dbName is the name of the database in the registry.
039: * @param tableName is the table name.
040: * @throws Exception if an error occurs.
041: */
042: protected void insertTable(final String dbName,
043: final String tableName) throws Exception {
044: TableManager tableManager = new TableManager(dbName);
045: tableManager.insertTable(tableName);
046: }
047:
048: /**
049: * Inserts a table the database. The transaction attribute is defined in the
050: * deployment descriptor.
051: * @param dbName is the name of the database in the registry.
052: * @param tableName is the table name.
053: * @throws Exception if an error occurs.
054: */
055: public void insertTable01(final String dbName,
056: final String tableName) throws Exception {
057: insertTable(dbName, tableName);
058: }
059:
060: /**
061: * Inserts a table the database. The transaction attribute is defined in the
062: * deployment descriptor.
063: * @param dbName is the name of the database in the registry.
064: * @param tableName is the table name.
065: * @throws Exception if an error occurs.
066: */
067: public void insertTable02(final String dbName,
068: final String tableName) throws Exception {
069: insertTable(dbName, tableName);
070: }
071:
072: /**
073: * Inserts a table the database. The transaction attribute is defined in the
074: * deployment descriptor.
075: * @param dbName is the name of the database in the registry.
076: * @param tableName is the table name.
077: * @param dummy is used to provide two methods with the same name.
078: * @throws Exception if an error occurs.
079: */
080: public void insertTable02(final String dbName,
081: final String tableName, final int dummy) throws Exception {
082: insertTable(dbName, tableName);
083: }
084:
085: /**
086: * Inserts a table the database. The transaction attribute is defined in the
087: * deployment descriptor.
088: * @param dbName is the name of the database in the registry.
089: * @param tableName is the table name.
090: * @throws Exception if an error occurs.
091: */
092: public void insertTable03(final String dbName,
093: final String tableName) throws Exception {
094: insertTable(dbName, tableName);
095: }
096:
097: /**
098: * Inserts a table the database. The transaction attribute is defined in the
099: * deployment descriptor.
100: * @param dbName is the name of the database in the registry.
101: * @param tableName is the table name.
102: * @param dummy is used to provide two methods with the same name.
103: * @throws Exception if an error occurs.
104: */
105: public void insertTable03(final String dbName,
106: final String tableName, final int dummy) throws Exception {
107: insertTable(dbName, tableName);
108: }
109: }
|