[jboss-cvs] jboss-seam/src/remoting/org/jboss/seam/remoting/gwt ...

Shane Bryzak sbryzak at redhat.com
Mon Oct 15 22:59:46 EDT 2007


  User: sbryzak2
  Date: 07/10/15 22:59:46

  Modified:    src/remoting/org/jboss/seam/remoting/gwt   GWT13Service.java
                        GWT14Service.java
  Log:
  simplified
  
  Revision  Changes    Path
  1.3       +21 -24    jboss-seam/src/remoting/org/jboss/seam/remoting/gwt/GWT13Service.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: GWT13Service.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/remoting/org/jboss/seam/remoting/gwt/GWT13Service.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- GWT13Service.java	16 Oct 2007 01:16:50 -0000	1.2
  +++ GWT13Service.java	16 Oct 2007 02:59:46 -0000	1.3
  @@ -38,14 +38,27 @@
      @Create
      public void startup() throws Exception
      {
  +      try
  +      {      
  +         log.trace("GWT13Service starting up");
  +         
         Class serializableType = Class.forName(SERIALIZABLE_TYPE_CLASS);
         String[] packagePaths = getPackagePaths();
         Constructor typeConstructor = serializableType.getConstructor(new Class[] { packagePaths.getClass() });
         
         serializableTypeOracle = typeConstructor.newInstance((Object[]) packagePaths);
         
  -      streamReaderConstructor = getConstructor(ServerSerializationStreamReader.class.getName(), new Class[] { serializableType } );
  -      streamWriterConstructor = getConstructor(ServerSerializationStreamWriter.class.getName(), new Class[] { serializableType } );
  +         streamReaderConstructor = ServerSerializationStreamReader.class.getConstructor(
  +               new Class[] { serializableType } );
  +         streamWriterConstructor = ServerSerializationStreamWriter.class.getConstructor(
  +               new Class[] { serializableType } );
  +      }
  +      catch (Exception ex)
  +      {
  +         log.error("Error initializing GWT13Service.  Please ensure " +
  +               "the GWT 1.3 libraries are in the classpath.");
  +         throw ex;
  +      }         
      }
   
      @Override
  @@ -68,22 +81,6 @@
         return (isException ? "{EX}" : "{OK}") + stream.toString();     
      }   
   
  -   private Constructor getConstructor(String className, Class[] paramTypes)
  -   {
  -      try
  -      {
  -         Class cls = Class.forName(className);
  -         return cls.getConstructor(paramTypes);
  -      }
  -      catch (Exception ex)
  -      {
  -         log.error(String.format("Error initializing GWT13Service - class %s " +
  -               "not found. Please ensure the GWT 1.3 libraries are in the classpath.",
  -               className));
  -         throw new RuntimeException("Unable to create GWT13Service", ex);
  -      }
  -   }
  -   
      @Override
      public ServerSerializationStreamReader getStreamReader()
      {
  
  
  
  1.2       +18 -23    jboss-seam/src/remoting/org/jboss/seam/remoting/gwt/GWT14Service.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: GWT14Service.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/remoting/org/jboss/seam/remoting/gwt/GWT14Service.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- GWT14Service.java	16 Oct 2007 00:51:39 -0000	1.1
  +++ GWT14Service.java	16 Oct 2007 02:59:46 -0000	1.2
  @@ -42,32 +42,27 @@
      @Create
      public void startup() throws Exception
      {
  +      try
  +      {
  +         log.trace("GWT14Service starting up");
  +         
         Class policyProviderClass = Class.forName(SERIALIZATION_POLICY_PROVIDER_CLASS);
         Class serializationPolicyClass = Class.forName(SERIALIZATION_POLICY_CLASS);
         
  -      streamReaderConstructor = getConstructor(ServerSerializationStreamReader.class.getName(), 
  +         streamReaderConstructor = ServerSerializationStreamReader.class.getConstructor(
               new Class[] { ClassLoader.class, policyProviderClass } );
  -      streamWriterConstructor = getConstructor(ServerSerializationStreamWriter.class.getName(), 
  +         streamWriterConstructor = ServerSerializationStreamWriter.class.getConstructor(
               new Class[] { serializationPolicyClass } );
   
         Class legacySerializationPolicyClass = Class.forName(LEGACY_SERIALIZATION_POLICY_CLASS);
         Method m = legacySerializationPolicyClass.getDeclaredMethod("getInstance");
         legacySerializationPolicy = m.invoke(null);
      } 
  -   
  -   private Constructor getConstructor(String className, Class[] paramTypes)
  -   {
  -      try
  -      {
  -         Class cls = Class.forName(className);
  -         return cls.getConstructor(paramTypes);
  -      }
         catch (Exception ex)
         {
  -         log.error(String.format("Error initializing GWT14Service - class %s " +
  -               "not found. Please ensure the GWT 1.4 libraries are in the classpath.",
  -               className));
  -         throw new RuntimeException("Unable to create GWT14Service", ex);
  +         log.error("Error initializing GWT14Service.  Please ensure " +
  +               "the GWT 1.4 libraries are in the classpath.");
  +         throw ex;
         }
      }   
      
  
  
  



More information about the jboss-cvs-commits mailing list