You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Fatima Sajjad <fa...@gmail.com> on 2017/04/07 05:37:13 UTC
how to enable Scala/Groovy route definition in camel web console
i am using came-web-standalone jars (2.15.4 and 2.15.6) as mentioned here
http://camel.apache.org/web-console.html
when i try to create routes on web console there is only option to create
route in XML. I can't find options for other languages like Groovy and Scala
in the following pages:
http://localhost:8080/routes/route2
http://localhost:8080/routes/create
How can i enable/edit the route definition in Groovy and Scala ?
Please reply soon
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: how to enable Scala/Groovy route definition in camel web console
Posted by Quinn Stevenson <qu...@pronoia-solutions.com>.
The only was I’ve seen routes added and removed from a Camel context dynamically is using OGSi and some sort of a service factory - here’s one example ( https://blog.avisi.nl/2014/06/05/creating-camel-routes-on-the-fly-using-osgi/ <https://blog.avisi.nl/2014/06/05/creating-camel-routes-on-the-fly-using-osgi/> )
> On Apr 7, 2017, at 3:28 AM, Fatima Sajjad <fa...@gmail.com> wrote:
>
> yeah i understand this its harder to do this is java.
>
> with reference to your following statement which is infact true .is there
> any standard camel project /sample having done this thing already ?
> "Groovy allows scripting so you can have it load some .groovy source
> code and compile and run that in an existing JVM."
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121p5797135.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: how to enable Scala/Groovy route definition in camel web
console
Posted by Fatima Sajjad <fa...@gmail.com>.
yeah i understand this its harder to do this is java.
with reference to your following statement which is infact true .is there
any standard camel project /sample having done this thing already ?
"Groovy allows scripting so you can have it load some .groovy source
code and compile and run that in an existing JVM."
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121p5797135.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: how to enable Scala/Groovy route definition in camel web console
Posted by Claus Ibsen <cl...@gmail.com>.
You can use the apis on CamelContext to add new routes / remove routes etc.
However its all standard Java and how you can add dynamic new code to
a running JVM is outside the scope of Apache Camel and you need to
look elsewhere how to do that.
Groovy allows scripting so you can have it load some .groovy source
code and compile and run that in an existing JVM. Plain Java code is
harder and you likely need some external tooling such as jrebel or
what else is out there. But I dont recommend doing so.
Try to look at the idea of immutable containers with rolling
upgrades/downgrades to change your running applications.
On Fri, Apr 7, 2017 at 9:27 AM, Fatima Sajjad <fa...@gmail.com> wrote:
> Thank you for your reply.
> Can you please answer one more question? Is there any way to define or add
> new routes in camel context without recompiling the project, Like run time
> route addition? Does any of the DSLs (Spring, Scala , Groovy or Java)
> provide that ?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121p5797125.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Re: how to enable Scala/Groovy route definition in camel web
console
Posted by Fatima Sajjad <fa...@gmail.com>.
Thank you for your reply.
Can you please answer one more question? Is there any way to define or add
new routes in camel context without recompiling the project, Like run time
route addition? Does any of the DSLs (Spring, Scala , Groovy or Java)
provide that ?
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121p5797125.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: how to enable Scala/Groovy route definition in camel web console
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
This web console is deprecated and removed in newer releases - do not use it.
And it can only edit routes in XML.
For groovy/scala use your IDE editor such as IDEA or Eclipse.
On Fri, Apr 7, 2017 at 7:37 AM, Fatima Sajjad <fa...@gmail.com> wrote:
> i am using came-web-standalone jars (2.15.4 and 2.15.6) as mentioned here
> http://camel.apache.org/web-console.html
> when i try to create routes on web console there is only option to create
> route in XML. I can't find options for other languages like Groovy and Scala
> in the following pages:
> http://localhost:8080/routes/route2
> http://localhost:8080/routes/create
>
> How can i enable/edit the route definition in Groovy and Scala ?
>
> Please reply soon
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/how-to-enable-Scala-Groovy-route-definition-in-camel-web-console-tp5797121.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2