[jboss-cvs] JBossAS SVN: r101206 - in projects/jboss-jca/trunk: common/src/main/java/org/jboss/jca/common/util and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Feb 20 22:51:34 EST 2010


Author: smarlow at redhat.com
Date: 2010-02-20 22:51:33 -0500 (Sat, 20 Feb 2010)
New Revision: 101206

Modified:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java
   projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
Log:
checkstyle cleaning and change ConnectionFactoryBuilder.getReference() to ConnectionFactoryBuilder.build()

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java	2010-02-21 00:09:22 UTC (rev 101205)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/ConnectionFactoryBuilder.java	2010-02-21 03:51:33 UTC (rev 101206)
@@ -37,15 +37,15 @@
 {
 
    /**
-    * Return the CF Reference.  The ConnectionFactory can be obtained from the Reference.
-    * @return Reference
-    * @throws DeployException
+    * Returns the Reference which has the ConnectionFactory.
+    * @return Reference which represents the ConnectionFactory
+    * @throws DeployException if the ConnectionFactory has already been previously built
     */
-   Reference getReference() throws DeployException;
+   Reference build() throws DeployException;
 
    /**
-    * specify the unique name of the connection factory builder  
-    * @param name
+    * specify the unique name of the connection factory   
+    * @param name of connection factory which should be unique
     * @return this for convenience
     */
    ConnectionFactoryBuilder setName(String name);

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java	2010-02-21 00:09:22 UTC (rev 101205)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalApplicationServerJNDIHandler.java	2010-02-21 03:51:33 UTC (rev 101206)
@@ -48,13 +48,7 @@
 
    /**
     * Obtain the connection factory
-    * @see ObjectFactory#getObjectInstance(Object, javax.naming.Name, javax.naming.Context, java.util.Hashtable)
-    * @param obj Is the Reference that we bound to JNDI
-    * @param name
-    * @param nameCtx
-    * @param environment
-    * @return the connection factory
-    * @throws Exception
+    * {@inheritDoc}
     */
    public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?, ?> environment)
       throws Exception
@@ -68,15 +62,18 @@
 
    /**
     * Register a connection factory builder
-    * @param name
-    * @param className
-    * @param cfb
+    * @param name of the connection factory
+    * @param className connection factory class name
+    * @param connectionFactoryBuilder is the connection factory builder to be registered 
     * @throws DeployException if already registered and therefore deployed
     */
-   public static void register(String name, String className, ConnectionFactoryBuilder cfb) throws DeployException
+   public static void register(String name,
+                               String className,
+                               ConnectionFactoryBuilder connectionFactoryBuilder)
+      throws DeployException
    {
 
-      if (null != connectionFactories.putIfAbsent(qualifiedName(name, className), cfb))
+      if (connectionFactories.putIfAbsent(qualifiedName(name, className), connectionFactoryBuilder) != null)
       {
          throw new DeployException("Deployment " + className + " failed, " + name + " is already deployed");
       }

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java	2010-02-21 00:09:22 UTC (rev 101205)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/util/LocalConnectionFactoryBuilder.java	2010-02-21 03:51:33 UTC (rev 101206)
@@ -42,9 +42,7 @@
    private String name;
 
    /**
-    * @see ConnectionFactoryBuilder#setName
-    * @param name
-    * @return this
+    * {@inheritDoc}
     */
    public ConnectionFactoryBuilder setName(String name)
    {
@@ -53,11 +51,9 @@
    }
 
    /**
-    * @see ConnectionFactoryBuilder#getReference
-    * @return Reference
-    * @throws DeployException
+    * {@inheritDoc}
     */
-   public Reference getReference() throws DeployException
+   public Reference build() throws DeployException
    {
       String className = cf.getClass().getName();
       String name = this.name;
@@ -72,9 +68,7 @@
    }
 
    /**
-    * @see ConnectionFactoryBuilder#setManagedConnectionFactory
-    * @param mcf is the managed connection factory to be used by connection factory.
-    * @return this
+    * {@inheritDoc}
     */
    public ConnectionFactoryBuilder setManagedConnectionFactory(ManagedConnectionFactory mcf)
    {
@@ -83,8 +77,7 @@
    }
 
    /**
-    * @see ConnectionFactoryBuilder#getManagedConnectionFactory
-    * @return ManagedConnectionFactory
+    * {@inheritDoc}
     */
    public ManagedConnectionFactory getManagedConnectionFactory()
    {
@@ -92,9 +85,7 @@
    }
 
    /**
-    * @see ConnectionFactoryBuilder#setConnectionFactory
-    * @param cf is the connection factory that will be returned
-    * @return this
+    * {@inheritDoc}
     */
    public ConnectionFactoryBuilder setConnectionFactory(Object cf)
    {
@@ -103,8 +94,7 @@
    }
 
    /**
-    * @see ConnectionFactoryBuilder#getConnectionFactory
-    * @return connection factory
+    * {@inheritDoc}
     */
    public Object getConnectionFactory()
    {

Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-02-21 00:09:22 UTC (rev 101205)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java	2010-02-21 03:51:33 UTC (rev 101206)
@@ -722,7 +722,7 @@
       {
 
          Referenceable referenceable = (Referenceable)cf;
-         referenceable.setReference(cfb.getReference());
+         referenceable.setReference(cfb.build());
 
          Util.bind(context, JNDI_PREFIX + name, cf);
 




More information about the jboss-cvs-commits mailing list