bean wiring in Spring framework

what is bean wiring in Spring framework ? Could you please explain a bit.

Any example please.
cofactorAsked:
Who is Participating?
 
Sathish David Kumar NArchitectCommented:
<bean id="check1" class="">
    <property value="check2" />
</bean>

<bean id="check2".........

this is you have defined the dispatcher-servlet xml file

check1,cheak2 are beans , you defined the check2 bean as property of check1 bean od this is combination of beans
0
 
StealthyDevCommented:
0
 
cofactorAuthor Commented:
Buddy, I have read that already . But I don't understand the concept . Please explain
its written as ...

Combining together beans within the Spring container is known as bean wiring or wiring. When wiring beans, you should tell the container what beans are needed and how the container should use dependency injection to tie them together. '
How do we combine beans ?  I need example .  How do we do the bean wiring ?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
StealthyDevCommented:
See the below Example, you will be surprised!

http://www.javalobby.org/java/forums/t18396.html

Best Regards.
0
 
Sathish David Kumar NArchitectCommented:
before that you must know the
singleton and prototype define of beans in spring ... this is the main concept here !

0
 
cofactorAuthor Commented:
>dispatcher-servlet xml
did you mean the Spring configuration file ?
0
 
rajkumar_pbCommented:
^^ Yes the dispatcher-servlet.xml is none other than spring cfg file.

Wiring :

In traditional programming ,creating associations between objects lead to code that is difficult to reuse and unit-test, and these objects are usually highly coupled to each-other making them hard to reuse and unit test, and they are doing more work than they should making them less cohesive.In spring components are not responsible for managing associations with other components. Instead they are given references to collaborating components by the container. The act of creating these associations between applications is called wiring.
You got that?

Refer this if you still have any doubt :

http://static.springsource.org/spring/docs/2.5.x/reference/beans.html#beans-dependencies
0
 
Sathish David Kumar NArchitectCommented:
yes your correct !!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.