spring jms example

Hi,

what is the importance of annotation-config ,Qualifier annotation. when to you use which one.  Please advise

I read annotation-config enable annotation based injection.
when to use @Resource. How specifying queue and topic are different.
Please advise
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

girionisCommented:
@Qualifier is used when you have more than one bean of the same type and you want to specify which one will be injected. For an exampel have a look here.

Yes, the annotation-config enables annotation based injection.

The @Resource uses a different post processor than @Autowired and @Inject and it matches first by name and then by type. For a comparison of all injection annotation have a look here.

Queue is used when you want to send a message to one subscriber. Topic is used when you want to send a queue to several subscribers.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gudii9Author Commented:
is there is a simple example with database(say mysql) interaction also. I see lot of real time projects using database as well. Please advise
0
girionisCommented:
What do you mean? Save the message in the database as well? If yes then this shouldn't be different from any other database interaction.
0
gudii9Author Commented:
What do you mean? Save the message in the database as well?

Yes doing some CRUD operations on the database(say mysql) including saving , deleting, modifying data/messages. I have installed mysql and workbench mysql IDE on my laptop.
0
girionisCommented:
You should save it independently of the JMS queue. Do what ever you have to do with the database and then send the message to the queue.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

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.