You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/12/29 09:08:33 UTC
svn commit: r1225468 -
/tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java
Author: markt
Date: Thu Dec 29 08:08:33 2011
New Revision: 1225468
URL: http://svn.apache.org/viewvc?rev=1225468&view=rev
Log:
Clean-up. No functional change.
Modified:
tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java
Modified: tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java?rev=1225468&r1=1225467&r2=1225468&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java (original)
+++ tomcat/trunk/java/org/apache/naming/factory/EjbFactory.java Thu Dec 29 08:08:33 2011
@@ -14,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.naming.factory;
import java.util.Hashtable;
@@ -36,25 +34,7 @@ import org.apache.naming.EjbRef;
* @author Remy Maucherat
* @version $Id$
*/
-
-public class EjbFactory
- implements ObjectFactory {
-
-
- // ----------------------------------------------------------- Constructors
-
-
- // -------------------------------------------------------------- Constants
-
-
- // ----------------------------------------------------- Instance Variables
-
-
- // --------------------------------------------------------- Public Methods
-
-
- // -------------------------------------------------- ObjectFactory Methods
-
+public class EjbFactory implements ObjectFactory {
/**
* Create a new EJB instance.
@@ -75,32 +55,6 @@ public class EjbFactory
// Retrieving the EJB link
String ejbLink = linkRefAddr.getContent().toString();
Object beanObj = (new InitialContext()).lookup(ejbLink);
- // Load home interface and checking if bean correctly
- // implements specified home interface
- /*
- String homeClassName = ref.getClassName();
- try {
- Class home = Class.forName(homeClassName);
- if (home.isInstance(beanObj)) {
- System.out.println("Bean of type "
- + beanObj.getClass().getName()
- + " implements home interface "
- + home.getName());
- } else {
- System.out.println("Bean of type "
- + beanObj.getClass().getName()
- + " doesn't implement home interface "
- + home.getName());
- throw new NamingException
- ("Bean of type " + beanObj.getClass().getName()
- + " doesn't implement home interface "
- + home.getName());
- }
- } catch (ClassNotFoundException e) {
- System.out.println("Couldn't load home interface "
- + homeClassName);
- }
- */
return beanObj;
}
@@ -171,9 +125,5 @@ public class EjbFactory
}
return null;
-
}
-
-
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org