Java -> Railo

121 views
Skip to first unread message

Patrick Santora

unread,
Dec 1, 2010, 7:18:15 PM12/1/10
to ra...@googlegroups.com
I've been doing some digging to try and find a way to couple JMS (ActiveMQ to be exact) to Railo. From what I've found the best solution is to attempt to hop through groovy to make this happen since there is no proxy available to build an ActiveMQ listener/consumer on the Java side that would call back to a CFC, but using the groovy lib locally within the CFC along with using GrovyJMS might get me by.

Also, I've been watching the chatter and know that Railo 4.0 should help with this since it will allow us to extend to java classes (assuming that I am interpreting this right) as well as supply event gateways of this nature, but in the meantime is there a "clean" way to approach this? Ideally I would like a Railo instance to listen for messages, which then can be processed. In CF land there is the CFCProxy, which could be used, but I don't think that will work in Railo due to how they are both structured under the hood?

Overall I am going to guess that the answer is going to be to wait until 4.0 comes out, but who knows, maybe someone has already broken through this functional wall.

-Pat

Todd Rafferty

unread,
Dec 1, 2010, 8:20:44 PM12/1/10
to ra...@googlegroups.com
You may want to talk to this blog author?
--
~Todd Rafferty ** Volunteer Railo Open Source Community Manager ** http://getrailo.org/

Patrick Santora

unread,
Dec 1, 2010, 9:11:20 PM12/1/10
to ra...@googlegroups.com
Cool. Thanks Todd!

Todd Rafferty

unread,
Dec 4, 2010, 8:29:36 PM12/4/10
to ra...@googlegroups.com
Also another one showed up recently:


On Wed, Dec 1, 2010 at 9:11 PM, Patrick Santora <patw...@gmail.com> wrote:
Cool. Thanks Todd!


On Wed, Dec 1, 2010 at 5:20 PM, Todd Rafferty <to...@getrailo.org> wrote:
You may want to talk to this blog author?

Todd Rafferty

unread,
Dec 7, 2010, 8:12:08 PM12/7/10
to ra...@googlegroups.com

Glen Rainbird

unread,
May 14, 2013, 8:32:00 PM5/14/13
to ra...@googlegroups.com
Hi All,

I'd like to know if anyone has Railo and ActiveMQ working together? I already have ACF applications publishing messages to topics and I want a Railo application to subscribe to these topics.

I have read and implemented:

But this example is for consuming messages from 'queues' not messages published to 'topics'. I attempted to tweak the above code so that it works with 'topics' but got stuck when I got to setMessageListener() - I guess attaching a listener to a Java object in CFML is wishful thinking.

I have done some digging in Railo on github and found this (https://github.com/getrailo/railo/blob/master/railo-cfml/railo-admin/admin/gdriver/ActiveMQ.cfc) - the config contains the magic word 'topic', this suggests to me that the code for Railo exists somewhere.

I have also sniffed around the .java files Sean Corfield wrote for ACF, which helped me understand a few things.

Can anyone point me in the right direction?

Oh, I should also mention I am running Railo 4.0.4.001. 
Access to the interwebs is through a proxy. 
The Railo Admin 'Server.Proxy' page throws an error so I can't configure Proxy Settings for Railo, so if the ActiveMQ Gateway is an installable 'Extension' is there another way to get the 'Extension'.

Cheers
Glen

Denny

unread,
May 15, 2013, 7:37:08 PM5/15/13
to ra...@googlegroups.com
On 5/14/13 6:32 PM, Glen Rainbird wrote:
> Hi All,
>
> I'd like to know if anyone has Railo and ActiveMQ working together? I
> already have ACF applications publishing messages to topics and I want a
> Railo application to subscribe to these topics.

I have HornetQ working with Railo, and theoretically it will consume
stuff from ActiveMQ, but I haven't tried.

...
> But this example is for consuming messages from 'queues' not messages
> published to 'topics'. I attempted to tweak the above code so that it works
> with 'topics' but got stuck when I got to setMessageListener() - I guess
> attaching a listener to a Java object in CFML is wishful thinking.

Not so! =)

One of my favorites:

jListener = createDynamicProxy(cfListener,["ListenerInterfaceName"])

...
> The Railo Admin 'Server.Proxy' page throws an error so I can't configure
> Proxy Settings for Railo, so if the ActiveMQ Gateway is an installable
> 'Extension' is there another way to get the 'Extension'.

What was the error? Maybe an issue should be filed.

:Denny

--
Railo Technologies: getrailo.com Professional Open Source
Skype: valliantster (505)510.1336 de...@getrailo.com
GnuPG-FP: DDEB 16E1 EF43 DCFD 0AEE 5CD0 964B B7B0 1C22 CB62

Glen Rainbird

unread,
May 17, 2013, 12:18:16 AM5/17/13
to ra...@googlegroups.com
Thanks Denny,

I'll look into how to use createDynamicProxy() and see if that helps me. If it doesn't then I'll try HornetQ - is this the one you're using https://github.com/cfmlprojects/cfhornetq ?

Also, I have raised an issue regarding the error - https://issues.jboss.org/browse/RAILO-2428

Cheers
Glen

Denny

unread,
May 18, 2013, 2:25:26 AM5/18/13
to ra...@googlegroups.com
On 5/16/13 10:18 PM, Glen Rainbird wrote:
> Thanks Denny,
>
> I'll look into how to use createDynamicProxy() and see if that helps me. If
> it doesn't then I'll try HornetQ - is this the one you're using
> https://github.com/cfmlprojects/cfhornetq ?

Yep. Check out the tests to see how/what's been implemented. It's
pretty simplistic, but if you look at the hornetq api it should be
pretty straightforward to add whatever you need, the library is quite
impressive.

> Also, I have raised an issue regarding the error -
> https://issues.jboss.org/browse/RAILO-2428

Thanks!

Jason Fill

unread,
Sep 17, 2013, 4:19:25 PM9/17/13
to ra...@googlegroups.com
Denny,

We are looking into HornetQ for a project and I am checking out that lib on github.  Do you know if there is any docs anywhere regarding getting that all installed and running on Railo?

Thanks in advance!

Michael Offner

unread,
Sep 18, 2013, 2:06:38 AM9/18/13
to ra...@googlegroups.com
Not that I know

Micha

Michael Offner
CTO The Railo Company Ltd
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/82673281-38f8-4355-8a04-747554f113df%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Denny

unread,
Sep 27, 2013, 9:19:51 PM9/27/13
to ra...@googlegroups.com
On 9/17/13 2:19 PM, Jason Fill wrote:
> We are looking into HornetQ for a project and I am checking out that lib on
> github. Do you know if there is any docs anywhere regarding getting that
> all installed and running on Railo?

There's not much to it, really. Check out the unit tests. There aren't
many, it's all pretty basic...

I'll go ahead and update the libs, maybe add a little README for using
it, but basically you should be able to drop it in your webroot I think.

You'd have to copy the gateway files and whatnot if you want to use
those aspects... yeah, let me check out the CI extension provider. If
that's working, using it would be easiest.
Reply all
Reply to author
Forward
0 new messages