[jdf-dev] Questions about integrating seam-spring for Quickstarts (@Produces ApplicationContext, <cdi:bean-manager/>, and the spring jars)

StevenBoscarine stevenboscarine at gmail.com
Wed Jul 11 11:31:36 EDT 2012


I had a few questions about seam-spring as related to the quickstart I 
submitted at https://github.com/StevenBoscarine/spring-seam-helloworld.  
It is a simplified version of 
https://github.com/mbogoevici/Seam-Spring-Basic-Example  My goal was to 
illustrate how to use seam-spring and strip the example down to the 
barest elements so beginners had less opportunity for confusion.


The example works great, but I left in some code not fully understanding 
what it does.  I'd love to provide explanations to the users.

First question

I noticed in Marius' example:
https://github.com/mbogoevici/Seam-Spring-Basic-Example/blob/master/src/main/java/org/jboss/seam/spring/example/cdi/Producers.java
...that he has a producer-field for ApplicationContext.  Is that necessary?

@Produces @Web @SpringContext
ApplicationContext context;


I added one in my application because I noticed it didn't seem to work 
without it and wanted to add better comments explaining why it was needed.
https://github.com/StevenBoscarine/spring-seam-helloworld/blob/master/src/main/java/org/jboss/as/quickstarts/seamspringhelloworld/jee/cdi/CDISpringBridge.java


For:
https://github.com/StevenBoscarine/spring-seam-helloworld/blob/master/src/main/resources/applicationContext.xml
What does the line below do?:

<!-- FIXME: What does this do? -->
<cdi:bean-manager />


Is spring-web needed?  What does it do?

<!-- Is this needed? -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>


Where can I find info on what the different Spring jars do?  I'd really 
love to explain to the user in a sentence or 2 why there's a spring-core 
and a spring-context and what each one does.

Thanks,
Steven


More information about the jdf-dev mailing list