Results 1 to 3 of 3

Thread: Which class is being used

  1. #1

    Default Which class is being used

    Hello Folks,
    This is a regular Spring framework question but it is also Spring Integration related, so I am posting it here.

    I have started to use the new Spring Integration/AMQP XML tags like the following:-

    <int-amqp:inbound-channel-adapter channel="testRabbitChannel"
    queue-names="testQueue"
    connection-factory="connectionFactory" />

    Now, my rudimentary question is:- Which Spring class is really being used here? I guess this is a basic question that every Spring developer faces when moving to the new (actually not so new) XML notation. I was using the bean id="beanName" class="org.springframework.SomeClass" notation so far.

    Is there a quick way I can find out (by looking at the source code?) which class is exactly being used?

    Thanks.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    You might want to take a look at the AmqpInboundChannelAdapterParser which contains the code to register all the needed beans.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Thank you very much Marten. That is exactly what I was looking for. There are *Parser.java classes that I can use to find out what class is actually being used.

    For example, I looked at org.springframework.scheduling.config.ScheduledTas ksBeanDefinitionParser and it has this method which helped me identify the class used when I use the scheduled-tasks tag in my XML

    @Override
    protected String getBeanClassName(Element element) {
    return "org.springframework.scheduling.config.ScheduledTa skRegistrar";
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •