davsclaus commented on a change in pull request #3859:
URL: https://github.com/apache/camel/pull/3859#discussion_r430194805



##########
File path: 
components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java
##########
@@ -327,8 +327,8 @@ protected void loadResource(String resourceUri, XsltBuilder 
xslt) throws Transfo
     }
 
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
+    protected void doInit() throws Exception {
+        super.doInit();

Review comment:
       We cannot do init here as createXsltBuilder is potentially loading 
resources from file system and that should be done in doStart. Loading 
exclusively from classpath is okay in doInit. But file system should be in 
doStart.

##########
File path: 
components/camel-sql/src/main/java/org/apache/camel/component/sql/stored/SqlStoredProducer.java
##########
@@ -123,8 +123,8 @@ private StatementWrapper createStatement(Exchange exchange) 
throws SQLException
     }
 
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
+    protected void doInit() throws Exception {
+        super.doInit();

Review comment:
       This should be doStart as SqlHelper.resolveQuery can potentially load 
the SQL template from file system. See the SQL docs

##########
File path: 
components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
##########
@@ -101,8 +101,8 @@ public DefaultSqlEndpoint getEndpoint() {
     }
 
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
+    protected void doInit() throws Exception {
+        super.doInit();

Review comment:
       This should be doStart as SqlHelper.resolveQuery can potentially load 
the SQL template from file system. See the SQL docs

##########
File path: 
components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
##########
@@ -303,7 +303,8 @@ public void setReadTimeout(int readTimeout) {
     //-------------------------------------------------------------------------
 
     @Override
-    protected void doStart() throws Exception {
+    protected void doInit() throws Exception {
+        super.doInit();

Review comment:
       charsets are potentially not available if native compiling, so we may 
consider to make this doStart. However there are ways to make native 
compilation include all charsets.

##########
File path: 
components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java
##########
@@ -69,8 +69,8 @@ public SqlEndpoint getEndpoint() {
     }
 
     @Override
-    protected void doStart() throws Exception {
-        super.doStart();
+    protected void doInit() throws Exception {
+        super.doInit();

Review comment:
       This should be doStart as SqlHelper.resolveQuery can potentially load 
the SQL template from file system. See the SQL docs




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to