[jira] Created: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
MailConfiguration injected into MailComponent by Spring is ignored.
-------------------------------------------------------------------

                 Key: CAMEL-1249
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-mail
    Affects Versions: 1.5.0, 1.4.0
         Environment: Camel
            Reporter: Michael Chen


A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
{code}
<bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
  <property name="configuration">
    <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
      <property name="protocol"><value>pop3</value></property>
      <property name="host"><value>mail.abc.com</value></property>
      <property name="username"><value>test</value></property>
      <property name="password"><value>test</value></property>
    </bean>
  </property>
</bean>
{code}
It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.

Line 73 and 74 should be changed from:
{quote}
        MailConfiguration config = new MailConfiguration();
        config.configure(url);
{quote}
to
{quote}
        configuration.configure(url);
{quote}
In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
{quote}
    from("mailbox").to("my_queue");
{quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1249:
----------------------------------

    Assignee: Claus Ibsen

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1249:
-------------------------------

    Fix Version/s: 2.0.0
                   1.5.1

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48635#action_48635 ]

Claus Ibsen commented on CAMEL-1249:
------------------------------------

Thanks for reporting this. I have fixed it.

About the last one using your own component. You need to set the mail configuration to ignore scheme
   <property name="ignoreSchemeUri"><value>true</value></property>

And then "mailbox" needs to be added as a Component. That is easy from Java, but in Spring there might be some component XML tag to declare this.
If not then I think we need it.

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1249.
--------------------------------

    Resolution: Fixed

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48663#action_48663 ]

Michael Chen commented on CAMEL-1249:
-------------------------------------

Claus,

Please correct your comment for this bug that mentioned the wrong
property name. The correct name according to your source code change is
"ignoreUriScheme", not "ignoreSchemeUri".  It may cause confusion for
others reading this fix.

Thank you

--Michael




> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48635#action_48635 ]

davsclaus edited comment on CAMEL-1249 at 1/13/09 9:02 PM:
-------------------------------------------------------------

Thanks for reporting this. I have fixed it.

About the last one using your own component. You need to set the mail configuration to ignore scheme
   <property name="ignoreUriScheme"><value>true</value></property>

And then "mailbox" needs to be added as a Component. That is easy from Java, but in Spring there might be some component XML tag to declare this.
If not then I think we need it.

*updated* with the correct property name

      was (Author: davsclaus):
    Thanks for reporting this. I have fixed it.

About the last one using your own component. You need to set the mail configuration to ignore scheme
   <property name="ignoreSchemeUri"><value>true</value></property>

And then "mailbox" needs to be added as a Component. That is easy from Java, but in Spring there might be some component XML tag to declare this.
If not then I think we need it.
 

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1249) MailConfiguration injected into MailComponent by Spring is ignored.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48676#action_48676 ]

Claus Ibsen commented on CAMEL-1249:
------------------------------------

Thanks Michael, I have updated it

> MailConfiguration injected into MailComponent by Spring is ignored.
> -------------------------------------------------------------------
>
>                 Key: CAMEL-1249
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1249
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.4.0, 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> A Camel org.apache.camel.component.mail.MailComponent is configured via Spring as:
> {code}
> <bean id="mailbox" class="org.apache.camel.component.mail.MailComponent">
>   <property name="configuration">
>     <bean id="mailbox_config" class="org.apache.camel.component.mail.MailConfiguration">
>       <property name="protocol"><value>pop3</value></property>
>       <property name="host"><value>mail.abc.com</value></property>
>       <property name="username"><value>test</value></property>
>       <property name="password"><value>test</value></property>
>     </bean>
>   </property>
> </bean>
> {code}
> It is silly to use the hard-coded URI in Java code to create a mail endpoint. Instead I want to use the above method to specify everything (I mean everything) about how to access a mail server (send or receive) in different deployments.  Up to Camel 1.5, line 73 of MailComponent.createEndpoint() ignored the MailConfiguration variable MailComponent.configuration and created a new one to parse the URI. This defeats the Spring injection above, which is recommended by Camel's own User's Guide.
> Line 73 and 74 should be changed from:
> {quote}
>         MailConfiguration config = new MailConfiguration();
>         config.configure(url);
> {quote}
> to
> {quote}
>         configuration.configure(url);
> {quote}
> In addition, if the uri parameter equals the component name, createEndpoint() should not parse it at all, so that the following route builder will create the mail endpoint solely according to the Spring injection of MailConfiguration:
> {quote}
>     from("mailbox").to("my_queue");
> {quote}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.