User: tobias
Date: 01/01/02 14:43:48
Modified: src/main/org/jboss/ejb/plugins/jaws/jdbc
JDBCDefinedFinderCommand.java
JDBCFindEntitiesCommand.java
Log:
bugfixes by Michel de Groot
Revision Changes Path
1.8 +0 -0
jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java
Index: JDBCDefinedFinderCommand.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCDefinedFinderCommand.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- JDBCDefinedFinderCommand.java 2001/01/02 09:10:00 1.7
+++ JDBCDefinedFinderCommand.java 2001/01/02 22:43:48 1.8
@@ -23,7 +23,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Joe Shevland</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Justin Forder</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Michel de Groot</a>
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class JDBCDefinedFinderCommand extends JDBCFinderCommand
{
1.7 +18 -18
jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFindEntitiesCommand.java
Index: JDBCFindEntitiesCommand.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFindEntitiesCommand.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JDBCFindEntitiesCommand.java 2001/01/02 09:08:54 1.6
+++ JDBCFindEntitiesCommand.java 2001/01/02 22:43:48 1.7
@@ -32,7 +32,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Joe Shevland</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Justin Forder</a>
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class JDBCFindEntitiesCommand implements JPMFindEntitiesCommand
{
@@ -51,26 +51,26 @@
// defined and automatic finders.
Class ejbClass = null;
try {
- ejbClass =
Class.forName(factory.getMetaData().getEntity().getEjbClass());
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
+ ejbClass =
Class.forName(factory.getMetaData().getEntity().getEjbClass());
- Method[] customMethods = ejbClass.getMethods();
-
- for (int i = 0; i < customMethods.length; i++)
- {
- Method m = customMethods[i];
- String name = m.getName();
- if (name.startsWith("ejbFindBy")) {
- String remoteName = "f"+name.substring(4);
- try {
- knownFinderCommands.put(remoteName, new
CustomFindByEntitiesCommand(m));
- factory.getLog().debug("Added custom finder " +
remoteName +".");
- } catch (IllegalArgumentException e) {
- factory.getLog().debug("Could not create the custom finder
" + remoteName+".");
+ Method[] customMethods = ejbClass.getMethods();
+
+ for (int i = 0; i < customMethods.length; i++)
+ {
+ Method m = customMethods[i];
+ String name = m.getName();
+ if (name.startsWith("ejbFindBy")) {
+ String remoteName = "f"+name.substring(4);
+ try {
+ knownFinderCommands.put(remoteName, new
CustomFindByEntitiesCommand(m));
+ factory.getLog().debug("Added custom finder "
+ remoteName +".");
+ } catch (IllegalArgumentException e) {
+ factory.getLog().debug("Could not create the
custom finder " + remoteName+".");
+ }
}
- }
+ }
+ } catch (Exception e) {
+ // for some reason, this failed; try to use defined or automatic
instead
}
// Make commands for the defined finders