You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ro...@apache.org on 2008/05/14 12:24:23 UTC

svn commit: r656223 - /activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Author: romkal
Date: Wed May 14 03:24:23 2008
New Revision: 656223

URL: http://svn.apache.org/viewvc?rev=656223&view=rev
Log:
by accident removed one constructor - now fixed

Modified:
    activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Modified: activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java?rev=656223&r1=656222&r2=656223&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java Wed May 14 03:24:23 2008
@@ -49,6 +49,12 @@
         this.query = query;
     }
 
+    public SqlEndpoint(String endpointUri, JdbcTemplate jdbcTemplate, String query) {
+        super(endpointUri);
+        this.jdbcTemplate = jdbcTemplate;
+        this.query = query;
+    }
+    
     public Consumer<DefaultExchange> createConsumer(Processor processor) throws Exception {
         throw new UnsupportedOperationException("Not yet implemented");
     }



Re: svn commit: r656223 - /activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Posted by Roman Kalukiewicz <ro...@gmail.com>.
2008/5/14 Claus Ibsen <ci...@silverbullet.dk>:
> Rom,
>
> Just noticed from the commit mail:
> Shouldn't we program against interfaces. If not mistaking DefaultExchange is the implementation of Exchange:
>
> So:
> Consumer<DefaultExchange>
>
> Should be:
> Consumer<Exchange>

You are right. In fact I was not sure what this parameter means here
;) . I will just remove the generic parameter, as James summarized
them as PITA anyway and we have an issue to remove them in
Expressions, Predicates and Processors (CAMEL-507).

I know that I somehow extended what James said, but I think we should
also remove those generics from Endpoints and from
Consumers/Producers.

In many cases we don't have those generics right now, and it would be
easier to remove them in future.

Roman

RE: svn commit: r656223 - /activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Rom, 

Just noticed from the commit mail:
Shouldn't we program against interfaces. If not mistaking DefaultExchange is the implementation of Exchange:

So:
Consumer<DefaultExchange>

Should be:
Consumer<Exchange>



Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: romkal@apache.org [mailto:romkal@apache.org] 
Sent: 14. maj 2008 12:24
To: camel-commits@activemq.apache.org
Subject: svn commit: r656223 - /activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Author: romkal
Date: Wed May 14 03:24:23 2008
New Revision: 656223

URL: http://svn.apache.org/viewvc?rev=656223&view=rev
Log:
by accident removed one constructor - now fixed

Modified:
    activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java

Modified: activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java?rev=656223&r1=656222&r2=656223&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlEndpoint.java Wed May 14 03:24:23 2008
@@ -49,6 +49,12 @@
         this.query = query;
     }
 
+    public SqlEndpoint(String endpointUri, JdbcTemplate jdbcTemplate, String query) {
+        super(endpointUri);
+        this.jdbcTemplate = jdbcTemplate;
+        this.query = query;
+    }
+    
     public Consumer<DefaultExchange> createConsumer(Processor processor) throws Exception {
         throw new UnsupportedOperationException("Not yet implemented");
     }