PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Update Spring Framework to 2.5.6 #142

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We should really update our Spring framework to the latest release on the
2.0 branch, 2.0.8.  We are currently using Spring 2.0.5.

I don't know if there is anything in Spring 2.5 or 3.0 we could leverage at
this time - it requires more investigation.

Original issue reported on code.google.com by Brett.Mi...@gmail.com on 15 Apr 2009 at 10:16

GoogleCodeExporter commented 8 years ago
Updating to 2.5.6 for the 2.0 release as recommended with Java SE 5.

Original comment by jl1615@gmail.com on 2 May 2009 at 1:40

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 6 May 2009 at 9:36

GoogleCodeExporter commented 8 years ago
Fixed 02 May 2009 in Connector Manager revision r1849 :

This updates the version of Spring Framework deployed with the
Connector Manager from 2.0.5 to the latest 2.5.6.  Originially,
I had planned to go to 2.0.8, but the Spring Framework release notes
state that Spring 2.5 should be used when running under Java 5:
"We highly recommend upgrading to Spring 2.5 from any Spring 2.0
application that runs on JDK 1.4.2 or higher, in particular when
running on Java 5 or higher, leveraging the significant configuration
conveniences and performance improvements that Spring 2.5 has to offer."

I also fixed a few improper uses of the bean container (Context) -
in particular calls in the code to getBean() that really
should be using Spring's Inversion of Control (IoC) model.
Mostly these were changed to use Setter Injection or Constructor
Injection.

Change Log:
----------
M  projects/connector-manager/third-party/prod/spring.jar
   - Spring Framework 2.5.6, recommended when using Java 5.

M  projects/connector-manager/source/java/com/google/enterprise/connector/instan
tiator/Instantiator.java
M  projects/connector-manager/source/java/com/google/enterprise/connector/instan
tiator/SpringInstantiator.java
M  projects/connector-manager/source/javatests/com/google/enterprise/connector/i
nstantiator/MockInstantiator.java
   - Added setScheduler() method, removed getBean lookup of Scheduler.

M  projects/connector-manager/source/java/com/google/enterprise/connector/instan
tiator/SpringInstantiator.java
   - Refactored initialize() into an init() method called by Context.start
     post bean creation.  Removed all the bootstrap calls to initialize()
     sprinkled throughout the class.

M  projects/connector-manager/source/java/com/google/enterprise/connector/instan
tiator/InstanceInfo.java
   - Added setters for the persistent stores and legacy stores,
     removed getBean lookups for them.

A  projects/connector-manager/source/java/com/google/enterprise/connector/common
/StaticInitializerBeanFactoryPostProcessor.java
   - Spring doesn't like to call static setters.  This class
     will call static setters without forcing the creation of
     dummy singletons.

M  projects/connector-
manager/source/java/com/google/enterprise/connector/manager/Context.java
   - Call SpringInstantiator.init() from start().
   - Moved TraversalScheduler thread creation to TraversalScheduler.init().

M  projects/connector-manager/source/java/com/google/enterprise/connector/schedu
ler/TraversalScheduler.java
   - Moved TraversalScheduler thread creation to TraversalScheduler.init().

M  projects/connector-
manager/source/java/com/google/enterprise/connector/scheduler/Schedule.java
   - The defaultRetryDelayMillis value is set by a setter rather than using
getBean().

M  projects/connector-manager/source/javatests/com/google/enterprise/connector/i
nstantiator/InstanceInfoTest.java
   - Force test Context initialization in setUp().  The Context was
     previously bootstrap initialized when InstanceInfo called getBean(),
     which it no longer does.

M  projects/connector-manager/testdata/mocktestdata/applicationContext.xml
M  projects/connector-manager/etc/applicationContext.xml
   - Additional use of setter and constructor value injectors.

Original comment by Brett.Mi...@gmail.com on 10 May 2009 at 4:40

GoogleCodeExporter commented 8 years ago
Updated 08 May 2009 in Connector Manager revision r1922 :

This change replaces the use of StaticInitializerBeanFactoryPostProcessor
with org.springframework.beans.factory.config.MethodInvokingFactoryBean
to call the static initializer methods.  We were already making extensive
use of MethodInvokingFactoryBean, and it appears to be the correct solution
for this issue.

Files Changed:
--------------
M  projects/connector-manager/etc/applicationContext.xml
M  projects/connector-manager/testdata/mocktestdata/applicationContext.xml
   - Invoke static setters using MethodInvokingFactoryBean, rather than
     StaticInitializerBeanFactoryPostProcessor.

M  projects/connector-manager/source/java/com/google/enterprise/connector/instan
tiator/InstanceInfo.java
   - Replaced individual setters with multi-argument setters for the
     ConnectorStores and LegacyStores.  This cuts down the XML verbage when
     using MethodInvokingFactoryBean.

M  projects/connector-manager/source/javatests/com/google/enterprise/connector/m
anager/ContextTest.java
   - Fix null pointer exception in test.  Not all beans have a name.

D  projects/connector-manager/source/java/com/google/enterprise/connector/common
/StaticInitializerBeanFactoryPostProcessor.java
   - Removed.

Original comment by Brett.Mi...@gmail.com on 10 May 2009 at 4:42

GoogleCodeExporter commented 8 years ago

Original comment by Brett.Mi...@gmail.com on 16 May 2009 at 8:55