[jboss-cvs] JBossAS SVN: r104654 - projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 10 23:02:46 EDT 2010
Author: jeff.zhang
Date: 2010-05-10 23:02:45 -0400 (Mon, 10 May 2010)
New Revision: 104654
Removed:
projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/ReferenceCodeGen.java
Modified:
projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/CciConnFactoryCodeGen.java
projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/Definition.java
projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/JCA16AnnoProfile.java
Log:
[JBJCA-307] remove Reference code
Modified: projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/CciConnFactoryCodeGen.java
===================================================================
--- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/CciConnFactoryCodeGen.java 2010-05-11 03:01:36 UTC (rev 104653)
+++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/CciConnFactoryCodeGen.java 2010-05-11 03:02:45 UTC (rev 104654)
@@ -45,10 +45,6 @@
out.write("public class " + getClassName(def) + " implements ConnectionFactory");
writeLeftCurlyBracket(out, 0);
int indent = 1;
- writeIndent(out, indent);
- out.write("private Reference reference;");
- writeEol(out);
- writeEol(out);
writeDefaultConstructor(def, out, indent);
@@ -194,16 +190,9 @@
writeEol(out);
writeIndent(out, indent);
out.write("public Reference getReference() throws NamingException");
- writeEol(out);
writeLeftCurlyBracket(out, indent);
writeIndent(out, indent + 1);
- out.write("if (reference == null)");
- writeEol(out);
- writeIndent(out, indent + 2);
- out.write("reference = new MyReference(this.getClass().getName());");
- writeEol(out);
- writeIndent(out, indent + 1);
- out.write("return reference;");
+ out.write("return null;");
writeRightCurlyBracket(out, indent);
writeEol(out);
@@ -213,8 +202,6 @@
writeIndent(out, indent);
out.write("public void setReference(Reference reference)");
writeLeftCurlyBracket(out, indent);
- writeIndent(out, indent + 1);
- out.write("this.reference = reference;");
writeRightCurlyBracket(out, indent);
writeEol(out);
}
Modified: projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/Definition.java
===================================================================
--- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/Definition.java 2010-05-11 03:01:36 UTC (rev 104653)
+++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/Definition.java 2010-05-11 03:02:45 UTC (rev 104654)
@@ -63,8 +63,6 @@
private String mcMetaClass;
/** connection manage class name */
private String cmClass;
- /** reference class name */
- private String referenceClass;
/**
* Set the outputDir.
@@ -353,27 +351,4 @@
cmClass = "MyConnectionManager";
return cmClass;
}
-
- /**
- * Set the referenceClass.
- *
- * @param referenceClass The referenceClass to set.
- */
- public void setReferenceClass(String referenceClass)
- {
- this.referenceClass = referenceClass;
- }
-
- /**
- * Get the referenceClass.
- *
- * @return the referenceClass.
- */
- public String getReferenceClass()
- {
- if (referenceClass == null || referenceClass.equals(""))
- referenceClass = "MyReference";
- return referenceClass;
- }
-
}
Modified: projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/JCA16AnnoProfile.java
===================================================================
--- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/JCA16AnnoProfile.java 2010-05-11 03:01:36 UTC (rev 104653)
+++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/JCA16AnnoProfile.java 2010-05-11 03:02:45 UTC (rev 104654)
@@ -58,7 +58,6 @@
generateClassCode(def, "CciConnFactory");
generateClassCode(def, "McMeta");
generateClassCode(def, "Cm");
- generateClassCode(def, "Reference");
}
/**
Deleted: projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/ReferenceCodeGen.java
===================================================================
--- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/ReferenceCodeGen.java 2010-05-11 03:01:36 UTC (rev 104653)
+++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/codegenerator/ReferenceCodeGen.java 2010-05-11 03:02:45 UTC (rev 104654)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jca.codegenerator;
-
-import java.io.IOException;
-import java.io.Writer;
-
-/**
- * A connection impl class CodeGen.
- *
- * @author Jeff Zhang
- * @version $Revision: $
- */
-public class ReferenceCodeGen extends AbstractCodeGen
-{
-
- /**
- * Output ResourceAdapater class
- * @param def definition
- * @param out Writer
- * @throws IOException ioException
- */
- @Override
- public void writeClassBody(Definition def, Writer out) throws IOException
- {
-
- out.write("public class " + getClassName(def) + " extends Reference");
- writeLeftCurlyBracket(out, 0);
- int indent = 1;
-
- //constructor
- writeIndent(out, indent);
- out.write("public " + getClassName(def) + "(String className)");
- writeLeftCurlyBracket(out, indent);
- writeIndent(out, indent + 1);
- out.write("super(className);");
- writeRightCurlyBracket(out, indent);
-
- writeRightCurlyBracket(out, 0);
- }
-
- /**
- * Output class import
- * @param def definition
- * @param out Writer
- * @throws IOException ioException
- */
- @Override
- public void writeImport(Definition def, Writer out) throws IOException
- {
- out.write("package " + def.getRaPackage() + ";");
- writeEol(out);
- writeEol(out);
- out.write("import javax.naming.Reference;");
- writeEol(out);
- writeEol(out);
- }
-
- /**
- * get this class name
- * @param def definition
- * @return String class name
- */
- @Override
- public String getClassName(Definition def)
- {
- return def.getReferenceClass();
- }
-}
More information about the jboss-cvs-commits
mailing list