PDA

View Full Version : Spring 1.1 / Spring-IDE 1.0.2 Compatibility


dockerysean
Sep 11th, 2004, 12:26 AM
Will I run into any compatibility issues or limitations in running the Spring-IDE 1.0.2 against a spring-beans.xml file for a Spring 1.1 application?

smccrory
Sep 11th, 2004, 03:41 PM
No problems here.

dockerysean
Sep 18th, 2004, 01:34 AM
Can you elaborate a bit? How extensively are you "pushing the envelope" with using Spring 1.1 features? Have there been any changes to the spring-beans.dtd for Spring 1.1? I can't tell because the DTD does not require a version attribute.

smccrory
Sep 18th, 2004, 08:59 AM
Sure. I'm using Spring for all my service-level declarative transaction support and it's handling my Hibernate session factory, session, configuration, etc. I'm also using Acegi to wrap all my services, so I have a chain of 4 beans for every service call. I was using 1.0.x and dropped 1.1 in without any changes to my configurations, nor to Spring-IDE, which I'm using to validate applicationConfiguration.xml. Note that I'm not using Spring's MVC support in case that matters.

dockerysean
Oct 22nd, 2004, 03:19 PM
I found a problem that I'm not sure as to whether the problem is a bug with the Spring-IDE or a 1.0/1.1 incompatibility problem.

I declare an AbstractService node as an interceptor with the intent of deriving concrete nodes from it. I can't remember exactly how it went but it was along the lines of the following:

<beans>

<bean id="dataSource" classname="...JndiFactory">
...
</bean>

<bean id="transactionManager" ...>
</bean>

<bean id="abstractService" abstract="true" classname="...Proxy">
<property name="transactionManager">
<bean refid="transactionManager"/>
</property>
<property name="methods">
<properties>
<prop name="load*">etc...</prop>
...regex for methods to be intercepted defined here...
</properties>
</property/>
</bean>

<bean id="productService" parent="abstractService">
<property name="target">
<bean classname="...ProductServiceImpl">
<property name="dataSource">
<bean refid="dataSource"/>
</property>
</bean>
</property>
</bean>

</beans>

By no means correct, but you get the idea.

Anyway, the Spring-IDE was giving a marker that "abstract must be declared" for the abstractService node. Well, as you can see, it had been declared, so it was a false error.

Re-arranging the declaration to eliminate the abstract node was the only way that I could get the marker to go away.

Torsten Juergeleit
Oct 22nd, 2004, 05:37 PM
Spring IDE 1.0.3 ships with an older spring-beans.dtd which doesn't know about the abstract attribute. The gory details can be found in this entry http://forum.springframework.org/showthread.php?t=10957

Cheers,
Torsten