User: oleg    
  Date: 00/09/27 10:06:10

  Modified:    src/main/org/jboss/ejb/plugins BMPPersistenceManager.java
                        CMPPersistenceManager.java
                        StatefulSessionFilePersistenceManager.java
  Log:
  Application exceptions are now extracted from InvocationTargetException before 
sending to client
  
  Revision  Changes    Path
  1.10      +6 -6      jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java
  
  Index: BMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BMPPersistenceManager.java        2000/09/26 20:18:50     1.9
  +++ BMPPersistenceManager.java        2000/09/27 17:06:08     1.10
  @@ -28,12 +28,12 @@
   
   
   /**
  -*    <description> 
  +*   <description> 
   *      
  -*    @see <related>
  -*    @author Rickard �berg ([EMAIL PROTECTED])
  +*   @see <related>
  +*   @author Rickard �berg ([EMAIL PROTECTED])
   *  @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*    @version $Revision: 1.9 $
  +*   @version $Revision: 1.10 $
   */
   public class BMPPersistenceManager
   implements EntityPersistenceManager
  @@ -109,7 +109,7 @@
             // Call ejbCreate
             id = createMethod.invoke(ctx.getInstance(), args);
            } catch (InvocationTargetException ite) {
  -          throw new CreateException("Create failed(could not call ejbCreate):"+ite);
  +          throw new CreateException("Create failed(could not call 
ejbCreate):"+ite.getTargetException());
            }
            
            // set the id
  @@ -133,7 +133,7 @@
            try {
             postCreateMethod.invoke(ctx.getInstance(), args);
            } catch (InvocationTargetException ite) {
  -          throw new CreateException("Create failed(could not call ejbPostCreate):" 
+ ite);
  +          throw new CreateException("Create failed(could not call ejbPostCreate):" 
+ ite.getTargetException());
            }
            
            //      } catch (InvocationTargetException e)
  
  
  
  1.8       +11 -11    jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java
  
  Index: CMPPersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CMPPersistenceManager.java        2000/09/26 20:18:50     1.7
  +++ CMPPersistenceManager.java        2000/09/27 17:06:09     1.8
  @@ -27,15 +27,15 @@
   import org.jboss.ejb.EntityPersistenceStore;
   
   /**
  -*    The CMP Persistence Manager implements the semantics of the CMP
  +*   The CMP Persistence Manager implements the semantics of the CMP
   *  EJB 1.1 call back specification. 
   *
   *  This Manager works with a "EntityPersistenceStore" that takes care of the 
   *  physical storing of instances (JAWS, JDBC O/R, FILE, Object).
   *      
  -*    @see <related>
  -*    @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  -*    @version $Revision: 1.7 $
  +*   @see <related>
  +*   @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
  +*   @version $Revision: 1.8 $
   */
   public class CMPPersistenceManager
   implements EntityPersistenceManager {
  @@ -58,7 +58,7 @@
       // Constructors --------------------------------------------------
       
       // Public --------------------------------------------------------
  -    public void setContainer(Container c)    {
  +    public void setContainer(Container c)   {
           con = (EntityContainer)c;
           if (store != null) store.setContainer(c);
       }
  @@ -119,12 +119,12 @@
               // Create a new CacheKey
                  Object cacheKey = ((EntityInstanceCache) 
con.getInstanceCache()).createCacheKey( id );
           
  -             // Give it to the context
  -             ctx.setCacheKey(cacheKey);
  +            // Give it to the context
  +            ctx.setCacheKey(cacheKey);
            
            
  -             // insert instance in cache, it is safe
  -             ((EntityInstanceCache) con.getInstanceCache()).insert(ctx);
  +            // insert instance in cache, it is safe
  +            ((EntityInstanceCache) con.getInstanceCache()).insert(ctx);
            
               // Create EJBObject
               
ctx.setEJBObject(con.getContainerInvoker().getEntityEJBObject(cacheKey));
  @@ -133,7 +133,7 @@
           
           } 
           catch (InvocationTargetException e) {
  -            throw new CreateException("Create failed:"+e);
  +            throw new CreateException("Create failed:"+e.getTargetException());
           } 
           catch (NoSuchMethodException e) {
               throw new CreateException("Create methods not found:"+e);
  @@ -168,7 +168,7 @@
            list.add(((EntityInstanceCache) 
con.getInstanceCache()).createCacheKey(idEnum.next()));
            }
           
  -       return list;           
  +       return list;      
       }
       
       /*
  
  
  
  1.9       +6 -6      
jboss/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java
  
  Index: StatefulSessionFilePersistenceManager.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/StatefulSessionFilePersistenceManager.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StatefulSessionFilePersistenceManager.java        2000/09/26 20:18:51     1.8
  +++ StatefulSessionFilePersistenceManager.java        2000/09/27 17:06:09     1.9
  @@ -52,15 +52,15 @@
   
   
   /**
  - *   StatefulSessionFilePersistenceManager
  + *  StatefulSessionFilePersistenceManager
    *
    *  This class is one of the passivating plugins for jBoss.  
    *  It is fairly simple and can work from the file system from wich jBoss is 
operating
    *      
  - *   @see <related>
  - *   @author Rickard �berg ([EMAIL PROTECTED])
  + *  @see <related>
  + *  @author Rickard �berg ([EMAIL PROTECTED])
    *  @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  - *   @version $Revision: 1.8 $
  + *  @version $Revision: 1.9 $
    */
   public class StatefulSessionFilePersistenceManager
      implements StatefulSessionPersistenceManager
  @@ -152,7 +152,7 @@
   
         } catch (InvocationTargetException e)
         {
  -         throw new CreateException("Create failed:"+e);
  +         throw new CreateException("Create failed:"+e.getTargetException());
         } catch (NoSuchMethodException e)
         {
            throw new CreateException("Create methods not found:"+e);
  @@ -204,7 +204,7 @@
             if (!Modifier.isTransient(fields[i].getModifiers()))
                 out.writeObject(fields[i].get(ctx.getInstance()));
            
  -         out.close();        
  +         out.close();   
          } catch (Exception e)
          {
             throw new ServerException("Passivation failed", e);
  
  
  

Reply via email to